I want to be able to update my script using update-script -allowprerelease. I'm not sure how to mark the script as prerelease before using Publish-Script to publish it. How do I do it?
I tried
$Params = @{
PrivateData = @{
PSData = @{
PreRelease = 'Testing'
}
}
}
Update-ScriptFileInfo @Params -PassThru
This added the following to the script, which didn't work:
.PRIVATEDATA System.Collections.Hashtable
A module manifest declares its prerelease label under the
PrivateData
key, but a script manifest can simply declare it in the.VERSION
metadata property:See Prerelease versions of scripts:
Edit:
Translated to a PowerShell command, the solution comes down to
Update-ScriptFileInfo -Path "/path/to/script.ps1" -Version "1.0.0-beta"
.