diff options
author | 2017-03-29 12:25:01 +0000 | |
---|---|---|
committer | 2017-03-29 19:27:11 +0200 | |
commit | ebe36f252f527c1835f6c9b57ede4c90a7ef23f1 (patch) | |
tree | 13d67f9235f6cff78bbfdd5cefc87963874dc306 /scripts/ci/build.sh | |
parent | 1d83f6c1d5874d38d787c4cf58fbf6479f85d823 (diff) |
Release: also push the final release to GCS
PiperOrigin-RevId: 151564075
Diffstat (limited to 'scripts/ci/build.sh')
-rwxr-xr-x | scripts/ci/build.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 8bcaf693b4..08c7389470 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -300,16 +300,20 @@ function release_to_gcs() { echo "Please set GCS_BUCKET to the name of your Google Cloud Storage bucket." >&2 return 1 fi - if [ -n "${release_name}" ] && [ -n "${rc}" ]; then + if [ -n "${release_name}" ]; then + local release_path="${release_name}" + if [ -n "${rc}" ]; then + release_path="${release_name}/rc${rc}" + fi # Make a temporary folder with the desired structure local dir="$(mktemp -d ${TMPDIR:-/tmp}/tmp.XXXXXXXX)" local prev_dir="$PWD" trap "{ cd ${prev_dir}; rm -fr ${dir}; }" EXIT - mkdir -p "${dir}/${release_name}/rc${rc}" - cp "${@}" "${dir}/${release_name}/rc${rc}" + mkdir -p "${dir}/${release_path}" + cp "${@}" "${dir}/${release_path}" # Add a index.html file: - create_index_html "${dir}/${release_name}/rc${rc}" \ - >"${dir}/${release_name}/rc${rc}"/index.html + create_index_html "${dir}/${release_path}" \ + >"${dir}/${release_path}"/index.html cd ${dir} "${gs}" -m cp -a public-read -r . "gs://${GCS_BUCKET}" cd "${prev_dir}" |