File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed
Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -131,9 +131,11 @@ function install_jq {
131131}
132132
133133function install_aztec_up {
134- # Download aztec-up from root (the canonical latest version).
135- # aztec-up is a version manager, so it's not version-specific.
136- curl -fsSL " $INSTALL_URI /aztec-up" -o " $shared_bin_path /aztec-up"
134+ # If there's a version of aztec-up at the VERSION location, use that, else fallback to root installer.
135+ if ! curl -fsSL " $INSTALL_URI /$VERSION /aztec-up" -o " $shared_bin_path /aztec-up" ; then
136+ # Download aztec-up from root.
137+ curl -fsSL " $INSTALL_URI /aztec-up" -o " $shared_bin_path /aztec-up"
138+ fi
137139 chmod +x " $shared_bin_path /aztec-up"
138140}
139141
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ function is_version_installed {
9595function is_semver {
9696 local version=" $1 "
9797 # Match semver: X.Y.Z with optional pre-release and build metadata
98- local semver_regex=' ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$'
98+ local semver_regex=' ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.- ]+)?(\+[a-zA-Z0-9.]+)?$'
9999 [[ " $version " =~ $semver_regex ]]
100100}
101101
Original file line number Diff line number Diff line change @@ -112,10 +112,8 @@ function release {
112112 # Upload version-specific files to version directory.
113113 do_or_dryrun aws s3 cp bin/0.0.1/install " s3://install.aztec.network/$version /install"
114114 do_or_dryrun aws s3 cp bin/0.0.1/versions " s3://install.aztec.network/$version /versions"
115-
116- # Upload root installer files to the version directory, which can be useful for testing.
117- do_or_dryrun aws s3 cp bin/aztec-install " s3://install.aztec.network/$version /aztec-install"
118- do_or_dryrun aws s3 cp bin/aztec-up " s3://install.aztec.network/$version /aztec-up"
115+ do_or_dryrun aws s3 cp bin/0.0.1/aztec-install " s3://install.aztec.network/$version /aztec-install"
116+ do_or_dryrun aws s3 cp bin/0.0.1/aztec-up " s3://install.aztec.network/$version /aztec-up"
119117
120118 # Update alias to point to new version.
121119 # This has real impact outside of the version fence. i.e. if it's nightly dist tag, it affects nightly installs.
@@ -126,8 +124,8 @@ function release {
126124# It's a manual process, as updating the root installer and alias index requires careful consideration.
127125function release_aztec_up {
128126 # Update root scripts.
129- do_or_dryrun aws s3 cp bin/aztec-install " s3://install.aztec.network/aztec-install"
130- do_or_dryrun aws s3 cp bin/aztec-up " s3://install.aztec.network/aztec-up"
127+ do_or_dryrun aws s3 cp bin/0.0.1/ aztec-install " s3://install.aztec.network/aztec-install"
128+ do_or_dryrun aws s3 cp bin/0.0.1/ aztec-up " s3://install.aztec.network/aztec-up"
131129
132130 # Update alias list.
133131 do_or_dryrun aws s3 cp bin/aliases/index " s3://install.aztec.network/aliases/index"
Original file line number Diff line number Diff line change 9393 else
9494 export NON_INTERACTIVE=1
9595 fi
96- bash ${bash_args:- } <( curl -s $INSTALL_URI /aztec-install)
96+ VERSION=0.0.1 bash ${bash_args:- } <( curl -s $INSTALL_URI /0.0.1 /aztec-install)
9797
9898 echo " Version information:"
9999
You can’t perform that action at this time.
0 commit comments