Responding to PR feedback
This commit is contained in:
parent
95f059697f
commit
4f2a8aeaf9
3 changed files with 24 additions and 3 deletions
|
@ -15,7 +15,6 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||||
source "$DIR/../common/_common.sh"
|
source "$DIR/../common/_common.sh"
|
||||||
source "$REPOROOT/scripts/build/generate-version.sh"
|
source "$REPOROOT/scripts/build/generate-version.sh"
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$DOTNET_CLI_VERSION" ]; then
|
if [ -z "$DOTNET_CLI_VERSION" ]; then
|
||||||
TIMESTAMP=$(date "+%Y%m%d%H%M%S")
|
TIMESTAMP=$(date "+%Y%m%d%H%M%S")
|
||||||
DOTNET_CLI_VERSION=0.0.1-dev-t$TIMESTAMP
|
DOTNET_CLI_VERSION=0.0.1-dev-t$TIMESTAMP
|
||||||
|
|
|
@ -135,6 +135,17 @@ function UploadInstallers($msiFile)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function UploadVersionBadge($badgeFile)
|
||||||
|
{
|
||||||
|
$fileName = [System.IO.Path]::GetFileName($badgeFile)
|
||||||
|
|
||||||
|
Write-Host "Uploading the version badge to Latest"
|
||||||
|
UploadFile "dev/Binaries/Latest/$filename" $badgeFile
|
||||||
|
|
||||||
|
Write-Host "Uploading the version badge to $env:DOTNET_CLI_VERSION"
|
||||||
|
UploadFile "dev/Binaries/$env:DOTNET_CLI_VERSION/$filename" $badgeFile
|
||||||
|
}
|
||||||
|
|
||||||
if(!(CheckRequiredVariables))
|
if(!(CheckRequiredVariables))
|
||||||
{
|
{
|
||||||
# fail silently if the required variables are not available for publishing the file
|
# fail silently if the required variables are not available for publishing the file
|
||||||
|
@ -158,7 +169,7 @@ elseif([System.IO.Path]::GetExtension($file).ToLower() -eq ".msi")
|
||||||
}
|
}
|
||||||
elseif ([System.IO.Path]::GetExtension($file).ToLower() -eq ".svg")
|
elseif ([System.IO.Path]::GetExtension($file).ToLower() -eq ".svg")
|
||||||
{
|
{
|
||||||
UploadFile "dev/Binaries/Latest/$([System.IO.Path]::GetFileName($file))" $file
|
UploadVersionBadge $file
|
||||||
$result = $true
|
$result = $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ execute(){
|
||||||
upload_binaries_to_blob_storage $UPLOAD_FILE
|
upload_binaries_to_blob_storage $UPLOAD_FILE
|
||||||
result=$?
|
result=$?
|
||||||
elif [[ $UPLOAD_FILE == *.svg ]]; then
|
elif [[ $UPLOAD_FILE == *.svg ]]; then
|
||||||
upload_file_to_blob_storage_azure_cli "dev/Binaries/Latest/$(basename $UPLOAD_FILE)" $UPLOAD_FILE
|
upload_version_badge $UPLOAD_FILE
|
||||||
result=0
|
result=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -190,6 +190,17 @@ upload_installers_to_blob_storage(){
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
upload_version_badge(){
|
||||||
|
local badgefile=$1
|
||||||
|
local filename=$(basename $badgefile)
|
||||||
|
echo "Uploading the version badge to Latest"
|
||||||
|
upload_file_to_blob_storage_azure_cli "dev/Binaries/Latest/$filename" $badgefile
|
||||||
|
|
||||||
|
echo "Uploading the version badge to $DOTNET_CLI_VERSION"
|
||||||
|
upload_file_to_blob_storage_azure_cli "dev/Binaries/$DOTNET_CLI_VERSION/$filename" $badgefile
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
generate_repoclient_json(){
|
generate_repoclient_json(){
|
||||||
# Clean any existing json file
|
# Clean any existing json file
|
||||||
rm -f $SCRIPT_DIR/$UPLOAD_JSON_FILE
|
rm -f $SCRIPT_DIR/$UPLOAD_JSON_FILE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue