upload_s3: move arguments to the top (#170)

This commit is contained in:
Cole Helbling 2023-01-09 13:19:40 -08:00 committed by GitHub
parent 12bf502bcb
commit 1849d9005a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,8 @@
set -eu
DEST="$1"
GIT_ISH="$2"
# If the revision directory has already been created in S3 somehow, we don't want to reupload
if aws s3 ls "$AWS_BUCKET"/"$GIT_ISH"/; then
echo "Revision $GIT_ISH was already uploaded; exiting"
@ -8,9 +11,6 @@ fi
sudo chown $USER: -R artifacts/
DEST="$1"
GIT_ISH="$2"
mkdir "$GIT_ISH"
sed -i "s@https://install.determinate.systems/nix@https://install.determinate.systems/nix/rev/$GIT_ISH@" nix-installer.sh