diff --git a/.circleci/config.yml b/.circleci/config.yml index 99bde18cac10..38a01680838b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -969,6 +969,11 @@ jobs: deploy_dockerhub cli deploy_dockerhub aztec-faucet deploy_dockerhub mainnet-fork + - run: + name: "Release canary to NPM: bb.js" + command: | + should_release || exit 0 + deploy_npm bb.js canary - run: name: "Release canary to NPM: yarn-project" command: | diff --git a/build-system/scripts/check_env b/build-system/scripts/check_env new file mode 100755 index 000000000000..b17ae50ab9aa --- /dev/null +++ b/build-system/scripts/check_env @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# check that the current system is able to run the build system. + +[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace +set -eu + +# check that our bash version is new enough. +major_version=${BASH_VERSION%%.*} + +# Check if the major version is less than 4 +if [[ $major_version -lt 4 ]]; then + echo "Bash version 4 or greater is required." + exit 1 +fi diff --git a/build-system/scripts/setup_env b/build-system/scripts/setup_env index 963c6e25001c..dc6ad03d0df7 100755 --- a/build-system/scripts/setup_env +++ b/build-system/scripts/setup_env @@ -23,6 +23,8 @@ PROJECT=$(cat $ROOT_PATH/PROJECT) COMMIT_MESSAGE=$(git log -n 1 --pretty=format:"%s" $COMMIT_HASH) PATH=$PATH:$BUILD_SYSTEM_PATH/scripts +check_env + export BRANCH echo "COMMIT_HASH=$COMMIT_HASH"