From 3a94e39336aad7790d32c9aa94ceb619f7d04399 Mon Sep 17 00:00:00 2001 From: Sridhar Periyasamy Date: Fri, 6 Nov 2015 16:35:33 -0800 Subject: [PATCH] Create/overwrite the latest blob with the most current tar.gz/deb/pkg --- scripts/publish.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 63c2762f4..b21c45653 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -124,16 +124,24 @@ upload_binaries_to_blob_storage(){ local filename=$(basename $tarfile) local blob="$CHANNEL/Binaries/$DOTNET_BUILD_VERSION/$filename" - if upload_file_to_blob_storage_azure_cli $blob $tarfile; then - # update the index file - local indexContent="Binaries/$DOTNET_BUILD_VERSION/$filename" - local indexfile="latest.$OSNAME.index" - local update_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$indexfile$SASTOKEN" - update_file_in_blob_storage $update_URL $indexfile $indexContent - return $? + if ! upload_file_to_blob_storage_azure_cli $blob $tarfile; then + return 1 fi - return 1 + # create the latest blob + echo "Updating the latest dotnet binaries.." + local latestblob="$CHANNEL/Binaries/Latest/dotnet-$OSNAME-x64.latest.tar.gz" + + if ! upload_file_to_blob_storage_azure_cli $latestblob $tarfile; then + return 1 + fi + + # update the index file + local indexContent="Binaries/$DOTNET_BUILD_VERSION/$filename" + local indexfile="latest.$OSNAME.index" + local update_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$indexfile$SASTOKEN" + update_file_in_blob_storage $update_URL $indexfile $indexContent + return $? } upload_installers_to_blob_storage(){ @@ -145,6 +153,15 @@ upload_installers_to_blob_storage(){ return 1 fi + # create the latest blob + echo "Updating the latest dotnet installer.." + local extension="${filename##*.}" + local latestblob="$CHANNEL/Installers/Latest/dotnet-$OSNAME-x64.latest.$extension" + + if ! upload_file_to_blob_storage_azure_cli $latestblob $installfile; then + return 1 + fi + # debain packages need to be uploaded to the PPA feed too if [[ $installfile == *.deb ]]; then DEB_FILE=$installfile