fix build and version upload
This commit is contained in:
parent
f029cb2734
commit
b920a77234
2 changed files with 7 additions and 6 deletions
|
@ -3,15 +3,15 @@ param(
|
|||
)
|
||||
|
||||
function CheckRequiredVariables
|
||||
{
|
||||
{
|
||||
if([string]::IsNullOrEmpty($env:DOTNET_BUILD_VERSION))
|
||||
{
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
||||
# this variable is set by the CI system
|
||||
if([string]::IsNullOrEmpty($env:SASTOKEN))
|
||||
{
|
||||
{
|
||||
return $false
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ function UploadFile($Upload_URI, $Uploadfile)
|
|||
{
|
||||
Write-Host "Uploading $Uploadfile to dotnet feed to.."
|
||||
|
||||
$statusCode = (Invoke-WebRequest -URI "$Upload_URI" -Method PUT -Headers @{"x-ms-blob-type"="BlockBlob"; "x-ms-date"="2015-10-23";"x-ms-version"="2013-08-15"} -InFile $Uploadfile).StatusCode
|
||||
$statusCode = (Invoke-WebRequest -URI "$Upload_URI" -Method PUT -Headers @{"x-ms-blob-type"="BlockBlob"; "x-ms-date"="2015-10-23";"x-ms-version"="2013-08-15"} -InFile $Uploadfile).StatusCode
|
||||
|
||||
if($statusCode -eq 201)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ function UploadBinaries($zipFile)
|
|||
}
|
||||
|
||||
# update the version file
|
||||
$versionFile = Convert-Path (Join-Path $PSScriptRoot\..\artifacts\win7-x64\stage2\.version)
|
||||
$versionFile = Convert-Path $PSScriptRoot\..\artifacts\win7-x64\stage2\.version
|
||||
$Version_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/dnvm/latest.win.version$env:SASTOKEN"
|
||||
|
||||
if(-Not (UploadFile $Version_URI $versionFile))
|
||||
|
|
|
@ -144,7 +144,8 @@ upload_binaries_to_blob_storage(){
|
|||
update_file_in_blob_storage $index_URL $indexfile $indexContent
|
||||
|
||||
# update the version file
|
||||
local versionContent=$(cat $REPOROOT/artifacts/$RID/stage2/.version)
|
||||
# the "@" prefix tells curl to upload the content of the file
|
||||
local versionContent="@$REPOROOT/artifacts/$RID/stage2/.version"
|
||||
local versionfile="latest.$OSNAME.version"
|
||||
local version_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$versionfile$SASTOKEN"
|
||||
update_file_in_blob_storage $version_URL $versionfile $versionContent
|
||||
|
|
Loading…
Reference in a new issue