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
Update version numbers to 6.0.2 #6402
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"ReleaseTag": "v6.0.1", | ||
"NextReleaseTag": "v6.1.0-preview.1" | ||
"ReleaseTag": "v6.0.2", | ||
"NextReleaseTag": "v6.1.0-preview.1" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -248,4 +248,54 @@ function Get-NewOfficalPackage | |
} | ||
} | ||
|
||
Export-ModuleMember -Function Get-ChangeLog, Get-NewOfficalPackage | ||
############################## | ||
#.SYNOPSIS | ||
# Update the version number in code | ||
# | ||
#.PARAMETER NewReleaseTag | ||
# The new Release Tag | ||
# | ||
#.PARAMETER NextReleaseTag | ||
# The next Release Tag | ||
# | ||
#.PARAMETER Path | ||
# The path to the root of where you want to update | ||
# | ||
############################## | ||
function Update-PsVersionInCode | ||
{ | ||
param( | ||
[Parameter(Mandatory)] | ||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")] | ||
[String] | ||
$NewReleaseTag, | ||
|
||
[Parameter(Mandatory)] | ||
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")] | ||
[String] | ||
$NextReleaseTag, | ||
|
||
[String] | ||
$Path = (Join-path -Path $PSScriptRoot -ChildPath '..') | ||
) | ||
|
||
$metaDataPath = (Join-Path -Path $PSScriptRoot -ChildPath 'metadata.json') | ||
$metaData = Get-Content -Path $metaDataPath | convertfrom-json | ||
$currentTag = $metaData.ReleaseTag | ||
|
||
$currentVersion = $currentTag -replace '^v' | ||
$newVersion = $NewReleaseTag -replace '^v' | ||
$metaData.NextReleaseTag = $NextReleaseTag | ||
Set-Content -path $metaDataPath -Encoding ascii -Force -Value ($metaData | convertto-json) | ||
|
||
Get-ChildItem -Path $Path -Recurse -File | | ||
Where-Object {$_.Extension -notin '.icns','.svg' -and $_.NAME -ne 'CHANGELOG.md' -and $_.DirectoryName -notmatch '[\\/]docs|demos[\\/]'} | | ||
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. Just to confirm: we are not going to change version strings for docs from now on, right? 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. Not automatically. I think after the change to remove the version from the path most of this will go away. |
||
Where-Object {$_ | Select-String -SimpleMatch $currentVersion -List} | | ||
Foreach-Object { | ||
$content = Get-Content -Path $_.FullName -Raw -ReadCount 0 | ||
$newContent = $content.Replace($currentVersion,$newVersion) | ||
Set-Content -path $_.FullName -Encoding ascii -Force -Value $newContent -NoNewline | ||
} | ||
} | ||
|
||
Export-ModuleMember -Function Get-ChangeLog, Get-NewOfficalPackage, Update-PsVersionInCode |
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.
Please remind me again, is the
ReleaseTag
field inmetadata.json
always points to the latest GA release?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.
I don't see the
ReleaseTag
being updated by this script, that's why I'm asking.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.
Let's discuss this...
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.
filed #6405 for the issue I thought you were talking about. the next step changes the release tag. We can refine this behavior later.