Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #106 from Thilas/fix-version-string
Browse files Browse the repository at this point in the history
Cast $Latest.Version to string when it's type is not assignable from string
  • Loading branch information
majkinetor authored Nov 2, 2017
2 parents 348e066 + 5d024c0 commit d1f1933
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AU/Public/Update-Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ function Update-Package {
if (!(is_version $Latest.Version)) { throw "Invalid version: $($Latest.Version)" }
$package.RemoteVersion = $Latest.Version

# For set_fix_version to work propertly, $Latest.Version's type must be assignable from string.
# If not, then cast its value to string.
if (!('1.0' -as $Latest.Version.GetType())) {
$Latest.Version = [string] $Latest.Version
}

if (!$NoCheckUrl) { check_urls }

"nuspec version: " + $package.NuspecVersion | result
Expand Down

0 comments on commit d1f1933

Please sign in to comment.