Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aztec-up/bin/aztec-install
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 9 additions & 17 deletions aztec-up/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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.
Expand Down