File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ version = File.read('version/number').chomp
4848
4949base_ami = ENV [ 'BASE_AMI' ]
5050unless supported_base_ami . include? base_ami
51- abort 'abort " Define BASE_AMI environment variable (i.e. windows2019 )'
51+ abort 'Define BASE_AMI environment variable (ex: windows2135 )'
5252end
5353
5454base_ami_name = ENV [ 'BASE_AMI_NAME' ]
Original file line number Diff line number Diff line change 11#! /bin/bash
2-
3- set -eo pipefail
2+ set -euo pipefail
43
54ACCOUNT_EMAIL=$( echo " ${ACCOUNT_JSON} " | jq -r .client_email)
65PROJECT_ID=$( echo " ${ACCOUNT_JSON} " | jq -r .project_id)
@@ -11,8 +10,8 @@ gcloud config set project "${PROJECT_ID}"
1110
1211set -x
1312
14- if [[ " $BASE_OS " != " windows2019 " ]]; then
15- echo " Define BASE_OS environment variable (i.e. windows2019 )" 1>&2
13+ if [[ " ${ BASE_OS} " =~ windows[0-9]{4} ]]; then
14+ echo " Define BASE_OS environment variable (ex: windows2135 )" 1>&2
1615 exit 1
1716fi
1817
2423image_id=$( gcloud compute images list --filter=" name~'${BASE_IMAGE_REGEX} '" --format json | jq -r .[0].name)
2524version=$( cat version/number)
2625
27- printf ' {"base_image":"%s","image_family":"%s"}' " $image_id " " $IMAGE_FAMILY " > base-gcp-image/base-gcp-image- $BASE_OS - $version .json
28-
26+ printf ' {"base_image":"%s","image_family":"%s"}' " $image_id " " $IMAGE_FAMILY " \
27+ > " base-gcp-image/base-gcp-image- ${BASE_OS} - ${version} .json "
You can’t perform that action at this time.
0 commit comments