diff --git a/aztec-up/bin/aztec-install b/aztec-up/bin/aztec-install index 05b0d05d54c9..ff0d21b4603a 100755 --- a/aztec-up/bin/aztec-install +++ b/aztec-up/bin/aztec-install @@ -152,7 +152,7 @@ if [ -z "${SKIP_PULL:-}" ]; then # If not latest, retag to be latest so it runs from scripts. if [ $VERSION != "latest" ]; then - docker tag aztecprotocol/aztec:$VERSION aztecprotocol/$1:latest + docker tag aztecprotocol/aztec:$VERSION aztecprotocol/aztec:latest fi fi diff --git a/aztec-up/bootstrap.sh b/aztec-up/bootstrap.sh index 7ed73adbd662..47a69e73c93f 100755 --- a/aztec-up/bootstrap.sh +++ b/aztec-up/bootstrap.sh @@ -25,9 +25,6 @@ function release { echo_header "aztec-up release" local version=${REF_NAME#v} - # Function to compare versions. - version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } - # Read the current version from S3. local current_version=$(aws s3 cp s3://install.aztec.network/VERSION - 2>/dev/null || echo "0.0.0") @@ -36,22 +33,17 @@ function release { return fi - # Validate that version is a valid semver. - if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Warning: $version is not a valid semver version. Skipping version comparison." - else - # Check if new version is greater than current version. - if version_gt "$version" "$current_version"; then - echo "Uploading new version: $version" + # Check if new version is greater than current version. + if [ $(semver sort "$version" "$current_version" | tail -1) == "$version" ]; then + echo "Uploading new version: $version" - # Upload new version to root. - do_or_dryrun aws s3 sync ./bin s3://install.aztec.network/ + # Upload new version to root. + do_or_dryrun aws s3 sync ./bin s3://install.aztec.network/ - # Update VERSION file. - echo "$version" | do_or_dryrun aws s3 cp - s3://install.aztec.network/VERSION - else - echo "New version $version is not greater than current version $current_version. Skipping root upload." - fi + # Update VERSION file. + echo "$version" | do_or_dryrun aws s3 cp - s3://install.aztec.network/VERSION + else + echo "New version $version is not greater than current version $current_version. Skipping root upload." fi # Always create a version directory and upload files there.