diff options
author | Russell O'Connor <oconnorr@google.com> | 2014-08-28 21:41:30 +0000 |
---|---|---|
committer | Russell O'Connor <oconnorr@google.com> | 2014-08-28 21:41:30 +0000 |
commit | cef0d1a41b62c0f781a6dc05992aa164ec5b2b05 (patch) | |
tree | 3e6115a4f6cafb1f448f9432fb9a6bd68f2d5e9f /nixos/maintainers | |
parent | e8badf3c3b6c3530a98a94223045822ed32f3365 (diff) |
Abstract bucket name in gce/create-gce.sh
Diffstat (limited to 'nixos/maintainers')
-rwxr-xr-x | nixos/maintainers/scripts/gce/create-gce.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/maintainers/scripts/gce/create-gce.sh b/nixos/maintainers/scripts/gce/create-gce.sh index 8bf36f33c7db..4261e8bf06b3 100755 --- a/nixos/maintainers/scripts/gce/create-gce.sh +++ b/nixos/maintainers/scripts/gce/create-gce.sh @@ -1,5 +1,6 @@ #! /bin/sh -e +BUCKET_NAME=${BUCKET_NAME:-nixos} export NIX_PATH=nixpkgs=../../../.. export NIXOS_CONFIG=$(dirname $(readlink -f $0))/../../../modules/virtualisation/google-compute-image.nix export TIMESTAMP=$(date +%Y%m%d%H%M) @@ -8,7 +9,7 @@ nix-build '<nixpkgs/nixos>' \ -A config.system.build.googleComputeImage --argstr system x86_64-linux -o gce --option extra-binary-caches http://hydra.nixos.org -j 10 img=$(echo gce/*.tar.gz) -if ! gsutil ls gs://nixos/$(basename $img); then - gsutil cp $img gs://nixos/$(basename $img) +if ! gsutil ls gs://${BUCKET_NAME}/$(basename $img); then + gsutil cp $img gs://${BUCKET_NAME}/$(basename $img) fi -gcutil addimage $(basename $img .raw.tar.gz | sed 's|\.|-|' | sed 's|_|-|') gs://nixos/$(basename $img) +gcutil addimage $(basename $img .raw.tar.gz | sed 's|\.|-|' | sed 's|_|-|') gs://${BUCKET_NAME}/$(basename $img) |