Create Start-PSRelease helper function#2753
Create Start-PSRelease helper function#2753
Conversation
| try { | ||
| # check that we are in the right location | ||
| if ($IsWindows) { | ||
| if ($PSScriptRoot -ne "C:\PowerShell") { |
There was a problem hiding this comment.
How necessary is this? We can create packages out of arbitrary directories can't we?
If it is required, what about this instead?
(Join-Path $env:systemdrive "PowerShell")
There was a problem hiding this comment.
This is to make pdb paths uniformed. See https://github.com/PowerShell/PowerShell/blob/172b2234fc5a82df0350cddeb6f91837b7999225/docs/maintainers/releasing.md#preparing
For the same reason, we don't want any divergancy from C:\PowerShell
| try { | ||
| # make sure that we have up-to-date version of build tools | ||
| Start-PSBootstrap -Package | ||
| # run the clean build that will use temporarely tag |
| if ($untrackedFiles) { | ||
| throw "There are untracked files (run 'git clean -fdx'): $untrackedFiles" | ||
| } | ||
|
|
There was a problem hiding this comment.
Check that the current branch != master?
There was a problem hiding this comment.
It doesn't matter as far as the commit is right, which is checked above in
if ((git rev-parse HEAD) -ne $CommitSHA1) {
| # run the clean build that will use temporarely tag | ||
| Start-PSBuild -Clean -Crossgen -PSModuleRestore | ||
| # make the package | ||
| Start-PSPackage |
There was a problem hiding this comment.
Start-PSBuild + Start-PSPackage must be paired when producing multiple packages from the same repo. For example, we now need to run the pair 4 times with different argument sets to produce the Windows packages.
There was a problem hiding this comment.
Good point. I don't have a windows machine anymore to test the build, but it should be a loop for windows here.
Then for Linux, we should probably replace it by a docker build call.
|
@vors I kind of want this merged, even in an incomplete state so that we can continue adding to it. I scripted Windows image generation during the last release and I could add that as my contribution to this function. |
|
@mirichmo great, want to merge it then? |
Addresses first two items in #2712
The intention is to make release process easier and put safety checks everywhere to reduce the probability of creating a bad package.
The command is wrapper of
Start-PSPackagethat follows https://github.com/PowerShell/PowerShell/blob/master/docs/maintainers/releasing.mdreleasing.mdupdatedUsage