create-amis.sh: Change directory for AMIs

Changed files
+2 -1
nixos
maintainers
scripts
+2 -1
nixos/maintainers/scripts/ec2/create-amis.sh
···
major=${version:0:5}
echo "NixOS version is $version ($major)"
-
stateDir=/var/tmp/ec2-image-$version
echo "keeping state in $stateDir"
mkdir -p $stateDir
···
# Create a snapshot.
if [ -z "$snapId" ]; then
echo "creating snapshot..."
snapId=$(aws ec2 create-snapshot --volume-id "$volId" --region "$region" --description "$description" | jq -r .SnapshotId)
if [ "$snapId" = null ]; then exit 1; fi
echo -n "$snapId" > $stateDir/$region.$type.snap-id
···
major=${version:0:5}
echo "NixOS version is $version ($major)"
+
stateDir=/home/deploy/amis/ec2-image-$version
echo "keeping state in $stateDir"
mkdir -p $stateDir
···
# Create a snapshot.
if [ -z "$snapId" ]; then
echo "creating snapshot..."
+
# FIXME: this can fail with InvalidVolume.NotFound. Eventual consistency yay.
snapId=$(aws ec2 create-snapshot --volume-id "$volId" --region "$region" --description "$description" | jq -r .SnapshotId)
if [ "$snapId" = null ]; then exit 1; fi
echo -n "$snapId" > $stateDir/$region.$type.snap-id