diff --git a/.gitignore b/.gitignore index 8deb70e27..b620a468b 100644 --- a/.gitignore +++ b/.gitignore @@ -269,3 +269,8 @@ _Pvt_Extensions # Exceptions # Build Scripts !scripts/build/ +test/PackagedCommands/Consumers/*/project.json + +# Vim swp files +*.swp +*.*~ diff --git a/scripts/package/.package.ps1.swp b/scripts/package/.package.ps1.swp deleted file mode 100644 index 9fdec182d..000000000 Binary files a/scripts/package/.package.ps1.swp and /dev/null differ diff --git a/scripts/package/package.ps1 b/scripts/package/package.ps1 index b008d3abb..242a76c0d 100644 --- a/scripts/package/package.ps1 +++ b/scripts/package/package.ps1 @@ -17,6 +17,7 @@ _ "$RepoRoot\packaging\nuget\package.ps1" @("$Stage2Dir\bin", "$env:VersionSuffi header "Generating version badge" $VersionBadge = "$RepoRoot\resources\images\version_badge.svg" -(get-content $VersionBadge).replace("ver_number", "$env:DOTNET_CLI_VERSION") | set-content $VersionBadge +$BadgeDestination = "$RepoRoot\artifacts\version_badge.svg" +(get-content $VersionBadge).replace("ver_number", "$env:DOTNET_CLI_VERSION") | set-content $BadgeDestination -& "$RepoRoot\publish\publish.ps1" -file $VersionBadge +& "$RepoRoot\publish\publish.ps1" -file $BadgeDestination diff --git a/scripts/package/package.sh b/scripts/package/package.sh index 1113120c6..bc81d33eb 100755 --- a/scripts/package/package.sh +++ b/scripts/package/package.sh @@ -21,6 +21,7 @@ if [ -z "$DOTNET_CLI_VERSION" ]; then fi $VERSION_BADGE="$REPOROOT/resources/images/version_badge.svg" +$BADGE_DESTINATION="$REPOROOT/artifacts/version_badge.svg" header "Generating tarball" $DIR/package-dnvm.sh @@ -29,8 +30,8 @@ header "Generating Native Installer" $DIR/package-native.sh header "Generating version badge" -sed -i "s/ver_number/$DOTNET_CLI_VERSION/g" $VERSION_BADGE +sed "s/ver_number/$DOTNET_CLI_VERSION/g" $VERSION_BADGE > $BADGE_DESTINATION header "Publishing version badge" -$REPOROOT/scripts/publish/publish.sh $VERSION_BADGE +$REPOROOT/scripts/publish/publish.sh $BADGE_DESTINATION diff --git a/scripts/publish/publish.ps1 b/scripts/publish/publish.ps1 index a363b53c3..49b95ca14 100644 --- a/scripts/publish/publish.ps1 +++ b/scripts/publish/publish.ps1 @@ -144,6 +144,8 @@ function UploadVersionBadge($badgeFile) Write-Host "Uploading the version badge to $env:DOTNET_CLI_VERSION" UploadFile "dev/Binaries/$env:DOTNET_CLI_VERSION/$filename" $badgeFile + + return 0 } if(!(CheckRequiredVariables)) @@ -169,8 +171,7 @@ elseif([System.IO.Path]::GetExtension($file).ToLower() -eq ".msi") } elseif ([System.IO.Path]::GetExtension($file).ToLower() -eq ".svg") { - UploadVersionBadge $file - $result = $true + $result = UploadVersionBadge $file } exit $result diff --git a/scripts/publish/publish.sh b/scripts/publish/publish.sh index 100bf9d42..71d0e8c00 100755 --- a/scripts/publish/publish.sh +++ b/scripts/publish/publish.sh @@ -48,7 +48,7 @@ execute(){ result=$? elif [[ $UPLOAD_FILE == *.svg ]]; then upload_version_badge $UPLOAD_FILE - result=0 + result=$? fi exit $result @@ -198,6 +198,8 @@ upload_version_badge(){ echo "Uploading the version badge to $DOTNET_CLI_VERSION" upload_file_to_blob_storage_azure_cli "dev/Binaries/$DOTNET_CLI_VERSION/$filename" $badgefile + + return 0 }