-
Notifications
You must be signed in to change notification settings - Fork 8.4k
$PSVersionTable.GitCommitId based on generated constant #3690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
acc80be
$PSVersionTable.GitCommitId based on generated constant
iSazonov 90e090f
Remove "powershell.version" file
iSazonov aaf27a9
Generate PSVersion
iSazonov d46752b
Remove 'powershell.version' from all files
iSazonov 6ec07b9
Update assemblies versions by MSBuild
iSazonov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Update assemblies versions by MSBuild
- Loading branch information
commit 6ec07b9818198108d6898b32a8af72da59ff3ab6
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,13 +153,13 @@ function Start-PSBuild { | |
| # Generate version constant for $PSVersionTable | ||
| function Start-PowerShellVersionGen { | ||
| $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --abbrev=60 --long | ||
| $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d+)-g(.+)")).Groups.Value | ||
| $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^v(\d+).(\d+).(\d+)-(.+)")).Groups.Value | ||
| $formattedVersion = "Version: $($matchVersion[1])" | ||
| $matchVersion = ([regex]::Match($powershellVersion, "^v(.+)-(\d+)-g(.+)")).Groups.Value | ||
| $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^(\d+).(\d+).(\d+)-(.+)")).Groups.Value | ||
| $Global:formattedVersion = "$($matchVersion[1])" | ||
| if ($($matchVersion[1]) -ne "0") { | ||
| $formattedVersion += " Additional commits: $($matchVersion[2])" | ||
| $Global:formattedVersion += " Additional commits: $($matchVersion[2])" | ||
| } | ||
| $formattedVersion += " Commit Hash: $($matchVersion[3])" | ||
| $Global:formattedVersion += " Commit Hash: $($matchVersion[3])" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @JamesWTruher the telemetry you're receiving is from @iSazonov running a build of PowerShell with this (not yet committed to master) change. |
||
|
|
||
| $template = @" | ||
| //------------------------------------------------------------------------------ | ||
|
|
@@ -182,6 +182,8 @@ namespace System.Management.Automation | |
| "@ | ||
|
|
||
| Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template | ||
|
|
||
| $Global:formattedVersion = $Global:formattedVersion -replace ' ', '%20' | ||
| } | ||
|
|
||
| if ($Clean) { | ||
|
|
@@ -332,6 +334,10 @@ Fix steps: | |
| # (Call after 'Start-ResGen'!) | ||
| Start-PowerShellVersionGen | ||
|
|
||
| # $Arguments += "/p:ProductVersion=$formattedVersion;InformationalVersion=$formattedVersion;" | ||
| $Arguments += "/p:ProductVersion=$formattedVersion;InformationalVersion=$formattedVersion" | ||
|
|
||
|
|
||
| # handle xaml files | ||
| # Heuristic to resolve xaml on the fresh machine | ||
| if ($FullCLR -and ($XamlGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.Activities/gen/*.g.cs"))) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <Product>PowerShell Core</Product> | ||
| <Company>Microsoft Corporation</Company> | ||
| <Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright> | ||
|
|
||
| <FileVersion>6.0.0.0</FileVersion> | ||
| <AssemblyVersion>6.0.0.0</AssemblyVersion> | ||
| <!-- | ||
| <ProductVersion>6.0.0-beta.1 Additional commits: 1 Commit Hash: 9ebe</ProductVersion> | ||
| <InformationalVersion>6.0.0-beta.1 Additional commits: 2 Commit Hash: 59ebe</InformationalVersion> | ||
| !--> | ||
| <TargetFramework>netcoreapp2.0</TargetFramework> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
|
|
||
| <DelaySign>true</DelaySign> | ||
| <AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
| </PropertyGroup> | ||
| </Project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change in formatting breaks our telemetry