From dab6dc3c9b3ff71edf8221c9ec755b402ecd78c1 Mon Sep 17 00:00:00 2001 From: Mitchell Tracy Date: Wed, 10 Jan 2024 07:45:31 -0500 Subject: [PATCH 1/2] deploy canary release of bb.js to npm via CCI add check_env script during setup_env --- .circleci/config.yml | 5 +++++ build-system/scripts/check_env | 14 ++++++++++++++ build-system/scripts/setup_env | 2 ++ 3 files changed, 21 insertions(+) create mode 100755 build-system/scripts/check_env diff --git a/.circleci/config.yml b/.circleci/config.yml index 99bde18cac1..38a01680838 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 00000000000..b17ae50ab9a --- /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 963c6e25001..dc6ad03d0df 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" From d84286ff36305bba32d5e0fa92501d74429c16b6 Mon Sep 17 00:00:00 2001 From: Mitchell Tracy Date: Wed, 10 Jan 2024 08:31:46 -0500 Subject: [PATCH 2/2] [ci dry-deploy]