https://gitlab.com/tezos/tezos
Revision 4f17540466cd3f31da2e09bcc4fa3f92b08b0df2 authored by Arvid Jakobsson on 08 March 2024, 12:19:39 UTC, committed by Arvid Jakobsson on 12 March 2024, 12:59:33 UTC
1 parent ec23e84
Raw File
Tip revision: 4f17540466cd3f31da2e09bcc4fa3f92b08b0df2 authored by Arvid Jakobsson on 08 March 2024, 12:19:39 UTC
CI: inline [job_trigger] into the [code_verification] pipeline
Tip revision: 4f17540
opam-check.sh
#!/bin/sh

script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"

# shellcheck source=scripts/version.sh
. "$script_dir"/version.sh

echo "## Checking installed dependencies..."
echo

if ! opam install opam/virtual/octez-deps.opam.locked --deps-only --with-test --show-actions | grep "Nothing to do." > /dev/null 2>&1; then
  echo
  echo 'Failure! Missing actions:'
  echo
  opam install opam/virtual/octez-deps.opam.locked --deps-only --with-test --show-actions
  echo
  # We really want literal backticks here, not command substitution.
  # shellcheck disable=SC2016
  echo 'Failed! Please read the doc in `./scripts/update_opam_repo.sh` and act accordingly.'
  echo
  exit 1
fi

# We really want literal backticks here, not command substitution.
# shellcheck disable=SC2016
echo '## Running `./scripts/update_opam_repo.sh`'
echo
./scripts/update_opam_repo.sh || exit 1

if [ -n "$(cat opam_repo.patch)" ]; then

  echo "##################################################"
  cat opam_repo.patch
  echo "##################################################"

  # We really want literal backticks here, not command substitution.
  # shellcheck disable=SC2016
  echo 'Failed! The variables `opam_repository_tag` and `full_opam_repository_tag` are not synchronized. Please read the doc in `./scripts/update_opam_repo.sh` and act accordingly.'
  echo
  exit 1
fi

echo "Ok."
back to top