From 09a04a66466cbe0c413e91b156a6ab752b984086 Mon Sep 17 00:00:00 2001 From: Sridhar Periyasamy Date: Fri, 6 Nov 2015 17:06:55 -0800 Subject: [PATCH] Create/overwrite the latest blob with the most current zip/msi Also updated the readme file to point to download locations for the latest binaries/installers --- README.md | 5 +++++ scripts/publish.ps1 | 54 ++++++++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 54a1b44af..1103a08b3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ Build Status |**Debug**|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_debug_ubuntu)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_ubuntu/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_debug_windows_nt)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_windows_nt/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_debug_osx)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_osx/) | |**Release**|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_release_ubuntu)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_ubuntu/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_release_windows_nt)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_windows_nt/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Private/dotnet_cli_release_osx)](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_osx/) | +| |Ubuntu 14.04 |Windows |Mac OS X | +|---------|:------:|:------:|:------:| +|**Installers**|[Download Debian Package](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-linux-x64.latest.deb)|[Download Msi](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-win-x64.latest.msi)|[Download Pkg](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-osx-x64.latest.pkg) | +|**Binaries**|[Download tar file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-linux-x64.latest.tar.gz)|[Download zip file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-win-x64.latest.zip)|[Download tar file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-osx-x64.latest.tar.gz) | + ## Prerequisites In order to build dotnet-cli, you need the following installed on you machine diff --git a/scripts/publish.ps1 b/scripts/publish.ps1 index 1a173db15..cd5c6be71 100644 --- a/scripts/publish.ps1 +++ b/scripts/publish.ps1 @@ -60,37 +60,55 @@ function UploadBinaries($zipFile) $fileName = [System.IO.Path]::GetFileName($zipFile) $Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Binaries/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN" - if(UploadFile $Upload_URI $zipFile) + if(-Not (UploadFile $Upload_URI $zipFile)) { - # update the index file too - $indexContent = "Binaries/$env:DOTNET_BUILD_VERSION/$fileName" - $indexFile = "$env:TEMP\latest.win.index" - $indexContent | Out-File -FilePath $indexFile - - # upload the index file - $Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/dnvm/latest.win.index$env:SASTOKEN" - - if(UploadFile $Upload_URI $indexFile) - { - $result = 0 - } + return -1 } - return $result + Write-Host "Updating the latest dotnet binaries for windows.." + $Upload_URI_Latest = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Binaries/Latest/dotnet-win-x64.latest.zip$env:SASTOKEN" + + if(-Not (UploadFile $Upload_URI_Latest $zipFile)) + { + return -1 + } + + + # update the index file too + $indexContent = "Binaries/$env:DOTNET_BUILD_VERSION/$fileName" + $indexFile = "$env:TEMP\latest.win.index" + $indexContent | Out-File -FilePath $indexFile + + # upload the index file + $Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/dnvm/latest.win.index$env:SASTOKEN" + + if(-Not (UploadFile $Upload_URI $indexFile)) + { + return -1 + } + + return 0 } function UploadInstallers($msiFile) { - $result = -1 $fileName = [System.IO.Path]::GetFileName($msiFile) $Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Installers/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN" - if(UploadFile $Upload_URI $msiFile) + if(-Not (UploadFile $Upload_URI $msiFile)) { - $result = 0 + return -1 } - return $result + Write-Host "Updating the latest dotnet installer for windows.." + $Upload_URI_Latest = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Installers/Latest/dotnet-win-x64.latest.msi$env:SASTOKEN" + + if(-Not (UploadFile $Upload_URI_Latest $msiFile)) + { + return -1 + } + + return 0 } if(!(CheckRequiredVariables))