Skip to content

move rcedit step to build rather than packaging - #5404

Merged
Dongbo Wang (daxian-dbw) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:rcedit
Nov 11, 2017
Merged

Dongbo Wang (daxian-dbw) merged 5 commits into
PowerShell:masterfrom
SteveL-MSFT:rcedit

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

Fix #5403

Comment thread build.psm1 Outdated
throw "RCEdit is required to modify pwsh.exe resources, please run 'Start-PSBootStrap' to install"
}

$ProductVersion = (git --git-dir="$PSScriptRoot/.git" describe) -Replace '^v'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use release tag parameter to get version if it was passed it. This is needed for release builds.

Comment thread build.psm1 Outdated
throw "RCEdit is required to modify pwsh.exe resources, please run 'Start-PSBootStrap' to install"
}

$ProductVersion = (git --git-dir="$PSScriptRoot/.git" describe) -Replace '^v'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Get-PSCommitId instead of rewriting this code git --git-dir="$PSScriptRoot/.git" describe

Comment thread build.psm1 Outdated
$ProductVersion = (git --git-dir="$PSScriptRoot/.git" describe) -Replace '^v'
if (!$ReleaseTag)
{
$ReleaseTag = Get-PSCommitId

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you still need to remove the v at the beginning.
Get-PSVersion will do that for you, but I don't have a function to do this for the releasetag.

Comment thread build.psm1 Outdated
$ReleaseVersion = ""
if ($ReleaseTag)
{
$ReleaseVersion = $ReleaseTag -replace '^v'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ReleaseTagToUse should already be this value

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bergmeister

Christoph Bergmeister (bergmeister) commented Nov 10, 2017 •

Copy link
Copy Markdown
Contributor

Minor but worth pointing out: The bracing style for if statements is inconsistent.

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Christoph Bergmeister (@bergmeister) I think that's a fair point. Will update for the code I added.

@SteveL-MSFT Steve Lee (SteveL-MSFT) added this to the 6.0.0-RC milestone Nov 11, 2017
@daxian-dbw

Copy link
Copy Markdown
Member

The macOS CI was canceled by Travis-CI ...
Given that changes in this PR don't affect PowerShell on Linux/macOS, I will merge this PR.

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 0f223c0 into PowerShell:master Nov 11, 2017
@daxian-dbw

Copy link
Copy Markdown
Member

Travis Plunk (@TravisEz13) note that even the step is moved to build phase, it's the publish\pwsh.exe that gets modified, so you need to copy the pwsh.exe from the publish folder when doing the signing.

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants