Skip to content

Commit

Permalink
Add missing files to sync and only sync schemas on final version (#924)
Browse files Browse the repository at this point in the history
* add version index.json file to azure sync

* only sync schemas if final release
  • Loading branch information
tjololo authored Feb 13, 2023
1 parent 968a574 commit cc2724d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit cc2724d

Please sign in to comment.