-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
The new prerelease support allows for prerelease naming of the package, but that doesn't reflect at all on PowerShell's versioning.
If I install module foo with a version of 2.0.0-beta1 (and powershell version 2.0.0), then later try to install foo 2.0.0, the second module install will silently fail.
Expected Behavior
Installing the released version of a module should supercede the prerelease version.
(this would likely also impact other pre-release versions - i.e. upgrading from beta1 to beta2)
Current Behavior
Attempting to install the released version over a pre-release fails silently.
Steps to Reproduce (for bugs)
register-PSModuleRepository -name PreReleaseTest -SourceLocation https://www.myget.org/F/usepowershell/api/v2
install-module PSConfAsia -allowprerelease -maximumversion 2.0.0-alpha-Repository PreReleaseTest -scope CurrentUser
## Print the version from PSGetModuleInfo
## Note the 2.0.0-alpha
([xml](cat ~\Documents\WindowsPowerShell\Modules\PSConfAsia\2.0.0\PSGetModuleInfo.xml -raw)).SelectNodes("//*[@N='NormalizedVersion']").'#text'
install-module PSConfAsia --maximumversion 2.0.0 -repository PreReleaseTest -scope CurrentUser
## Print the version from PSGetModuleInfo
## Still alpha
([xml](cat ~\Documents\WindowsPowerShell\Modules\PSConfAsia\2.0.0\PSGetModuleInfo.xml -raw)).SelectNodes("//*[@N='NormalizedVersion']").'#text'
install-module PSConfAsia --maximumversion 2.0.0 -repository PreReleaseTest -scope CurrentUser -force
## Print the version from PSGetModuleInfo
## How we have the release version
([xml](cat ~\Documents\WindowsPowerShell\Modules\PSConfAsia\2.0.0\PSGetModuleInfo.xml -raw)).SelectNodes("//*[@N='NormalizedVersion']").'#text'
> $PSVersionTable
LoECDA-PS > $PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.98
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.98
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Users\stmuraws\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.1.7.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.6.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Jaykul and gaelcolas