From cc2724d6ec12db528a558e6b4756f895d18d173c Mon Sep 17 00:00:00 2001 From: Vemund Gaukstad Date: Mon, 13 Feb 2023 14:45:09 +0100 Subject: [PATCH] Add missing files to sync and only sync schemas on final version (#924) * add version index.json file to azure sync * only sync schemas if final release --- .github/scripts/release.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index 76f257cdb4..3e0298cd32 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -182,7 +182,7 @@ else echo echo "azure-sa-name seems to be a local directory. Simulating azcopy sync with rsync to folder" echo - toolkits_rsync_opts=( -am --include='*/' --include="${APP_FULL}/*" ) + toolkits_rsync_opts=( -am --include='*/' --include="${APP_FULL}/*" --include="index.json" ) if [[ "$PRE_RELEASE" == "no" ]]; then toolkits_rsync_opts+=( --include="${APP_MAJOR}/*" --include="${APP_MAJOR_MINOR}/*" ) fi @@ -196,7 +196,7 @@ else set +x echo "-------------------------------------" else - AZCOPY_INCLUDE_REGEX="^$APP_FULL/*" + AZCOPY_INCLUDE_REGEX="^index\.json$|^$APP_FULL/*" if [[ "$PRE_RELEASE" == "no" ]]; then AZCOPY_INCLUDE_REGEX+="|^$APP_MAJOR/.*|^$APP_MAJOR_MINOR/.*" fi @@ -210,7 +210,9 @@ else echo "Publishing files to azure cdn" fi azcopy sync "$TARGET" "$AZURE_TARGET_URI/toolkits${AZURE_STORAGE_ACCOUNT_TOKEN}" "${AZCOPY_TOOLKITS_OPTS[@]}" "${AZCOPY_ADDITIONAL_OPTS[@]}" - azcopy sync "${TARGET_SCHEMAS}/json" "$AZURE_TARGET_URI/${AZURE_STORAGE_ACCOUNT_TOKEN}" "${AZCOPY_SCHEMAS_OPTS[@]}" "${AZCOPY_ADDITIONAL_OPTS[@]}" + if [[ "$PRE_RELEASE" == "no" ]]; then + azcopy sync "${TARGET_SCHEMAS}/json" "$AZURE_TARGET_URI/${AZURE_STORAGE_ACCOUNT_TOKEN}" "${AZCOPY_SCHEMAS_OPTS[@]}" "${AZCOPY_ADDITIONAL_OPTS[@]}" + fi echo "-------------------------------------" fi fi \ No newline at end of file