Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebbb97c

Browse files
pwshBotjshigetomiTravisEz13
authored
[release/v7.5] Fix MSIX artifact upload, vPack template, changelog hashes, git tag command (#25633)
Co-authored-by: Justin Chung <124807742+jshigetomi@users.noreply.github.com>Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
1 parent2240ac8 commitebbb97c

File tree

4 files changed

+64
-41
lines changed

4 files changed

+64
-41
lines changed

‎.pipelines/PowerShell-Release-Official.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -325,17 +325,6 @@ extends:
325325
instructions:|
326326
Run PowerShell-Release-Official-Azure.yml pipeline to publish to PMC
327327
328-
-stage:ReleaseDocker
329-
dependsOn:PushGitTagAndMakeDraftPublic
330-
displayName:'Docker Release'
331-
jobs:
332-
-template:/.pipelines/templates/approvalJob.yml@self
333-
parameters:
334-
displayName:Start Docker Release
335-
jobName:StartDockerRelease
336-
instructions:|
337-
Kickoff docker release
338-
339328
-stage:UpdateDotnetDocker
340329
dependsOn:PushGitTagAndMakeDraftPublic
341330
displayName:Update DotNet SDK Docker images
@@ -348,7 +337,7 @@ extends:
348337
Create PR for updating dotnet-docker images to use latest PowerShell version.
349338
1. Fork and clone https://github.com/dotnet/dotnet-docker.git
350339
2. git checkout upstream/nightly -b updatePS
351-
3. dotnet run --project .\eng\update-dependencies\-- <dotnetversion> --product-version powershell=<powershellversion> --compute-shas
340+
3. dotnet run --project .\eng\update-dependencies\specific <dotnetversion> --product-version powershell=<powershellversion> --compute-shas
352341
4. create PR targeting nightly branch
353342
354343
-stage:UpdateWinGet

‎.pipelines/PowerShell-vPack-Official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ extends:
118118
ob_createvpack_verbose:true
119119

120120
steps:
121-
-template:./templates/SetVersionVariables.yml
121+
-template:.pipelines/templates/SetVersionVariables.yml@self
122122
parameters:
123123
ReleaseTagVar:$(ReleaseTagVar)
124124
CreateJson:yes

‎.pipelines/templates/package-create-msix.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,13 @@ jobs:
9999
$signedBundle = Get-ChildItem -Path $(BundleDir) -Filter "*.msixbundle" -File
100100
Write-Verbose -Verbose "Signed bundle: $signedBundle"
101101
102-
if (-not (Test-Path $(ob_outputDirectory))) {
103-
New-Item -ItemType Directory -Path $(ob_outputDirectory) -Force
102+
# Ensure the destination directory exists
103+
if (-not (Test-Path -Path "$(ob_outputDirectory)")) {
104+
Write-Verbose -Verbose "Creating destination directory: $(ob_outputDirectory)"
105+
New-Item -Path "$(ob_outputDirectory)" -ItemType Directory -Force | Out-Null
104106
}
105107
106-
Copy-Item -Path $signedBundle.FullName -Destination "$(ob_outputDirectory)" -Verbose
108+
Copy-Item -Path $signedBundle.FullName -Destination "$(ob_outputDirectory)\$($signedBundle.Name)" -Verbose
107109
108110
Write-Verbose -Verbose "Uploaded Bundle:"
109111
Get-ChildItem -Path $(ob_outputDirectory) | Write-Verbose -Verbose

‎.pipelines/templates/release-githubNuget.yml

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ jobs:
3030
Get-ChildItem Env: | Out-String -Stream | Write-Verbose -Verbose
3131
displayName:'Capture Environment Variables'
3232

33-
-template:release-install-pwsh.yml
34-
3533
-task:PowerShell@2
3634
inputs:
3735
targetType:inline
38-
pwsh:true
3936
script:|
4037
$Path = "$(Pipeline.Workspace)/GitHubPackages"
4138
$OutputPath = Join-Path $Path 'hashes.sha256'
@@ -56,15 +53,13 @@ jobs:
5653
-task:PowerShell@2
5754
inputs:
5855
targetType:inline
59-
pwsh:true
6056
script:|
6157
Get-ChildItem $(Pipeline.Workspace) -recurse | Select-Object -ExpandProperty FullName
6258
displayName:List all files in the workspace
6359

6460
-task:PowerShell@2
6561
inputs:
6662
targetType:inline
67-
pwsh:true
6863
script:|
6964
$releaseVersion = '$(ReleaseTag)' -replace '^v',''
7065
Write-Verbose -Verbose "Available modules: "
@@ -85,6 +80,17 @@ jobs:
8580
8681
$clContent = $changelog | Select-Object -Skip ($startLine-1) -First ($endLine - $startLine) | Out-String
8782
83+
$StringBuilder = [System.Text.StringBuilder]::new($clContent, $clContent.Length + 2kb)
84+
$StringBuilder.AppendLine().AppendLine() > $null
85+
$StringBuilder.AppendLine("### SHA256 Hashes of the release artifacts").AppendLine() > $null
86+
Get-ChildItem -Path "$(Pipeline.Workspace)/GitHubPackages/" -File | ForEach-Object {
87+
$PackageName = $_.Name
88+
$SHA256 = (Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash
89+
$StringBuilder.AppendLine("- $PackageName").AppendLine(" - $SHA256") > $null
90+
}
91+
92+
$clContent = $StringBuilder.ToString()
93+
8894
Write-Verbose -Verbose "Selected content:`n$clContent"
8995
9096
$releaseNotesFilePath = "$(Pipeline.Workspace)/release-notes.md"
@@ -100,11 +106,32 @@ jobs:
100106
}
101107
displayName: Set variables for GitHub release task
102108
103-
-pwsh:|
104-
Write-Host "ReleaseNotes content:"
105-
Get-Content "$(Pipeline.Workspace)/release-notes.md" -Raw | Out-String -width 9999 | Write-Host
109+
- task: PowerShell@2
110+
inputs:
111+
targetType: inline
112+
script: |
113+
Write-Host "ReleaseNotes content:"
114+
Get-Content "$(Pipeline.Workspace)/release-notes.md" -Raw | Out-String -width 9999 | Write-Host
106115
displayName: Verify Release Notes
107116
117+
- task: PowerShell@2
118+
inputs:
119+
targetType: inline
120+
script: |
121+
$middleURL = ''
122+
$tagString = "$(ReleaseTag)"
123+
Write-Verbose -Verbose "Use the following command to push the tag:"
124+
if ($tagString -match '-') {
125+
$middleURL = "preview"
126+
}
127+
elseif ($tagString -match '(\d+\.\d+)') {
128+
$middleURL = $matches[1]
129+
}
130+
$endURL = $tagString -replace '[v\.]',''
131+
$message = "https://github.com/PowerShell/PowerShell/blob/master/CHANGELOG/$middleURL.md#$endURL"
132+
Write-Verbose -Verbose "git tag -a $(ReleaseTag) $env:BUILD_SOURCEVERSION -m $message"
133+
displayName: Git Push Tag Command
134+
108135
- task: GitHubRelease@1
109136
inputs:
110137
gitHubConnection: GitHubReleasePAT
@@ -113,6 +140,7 @@ jobs:
113140
assets: '$(Pipeline.Workspace)/GitHubPackages/*'
114141
tagSource: 'userSpecifiedTag'
115142
tag: '$(ReleaseTag)'
143+
title: "$(ReleaseTag) Release of PowerShell"
116144
isDraft: true
117145
addChangeLog: false
118146
action: 'create'
@@ -136,28 +164,32 @@ jobs:
136164
VERSION: $[ stageDependencies.setReleaseTagAndChangelog.SetTagAndChangelog.outputs['OutputVersion.Version'] ]
137165
138166
steps:
139-
-template:release-install-pwsh.yml
140-
141-
-pwsh:|
142-
Write-Verbose -Verbose "Version: $(Version)"
143-
Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
167+
- task: PowerShell@2
168+
inputs:
169+
targetType: inline
170+
script: |
171+
Write-Verbose -Verbose "Version: $(Version)"
172+
Get-ChildItem Env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
144173
displayName: 'Capture Environment Variables'
145174
146-
-pwsh:|
147-
#Exclude all global tool packages. Their names start with 'PowerShell.'
148-
$null = New-Item -ItemType Directory -Path "$(Pipeline.Workspace)/release"
149-
Copy-Item "$(Pipeline.Workspace)/NuGetPackages/*.nupkg" -Destination "$(Pipeline.Workspace)/release" -Exclude "PowerShell.*.nupkg" -Force -Verbose
175+
- task: PowerShell@2
176+
inputs:
177+
targetType: inline
178+
script: |
179+
#Exclude all global tool packages. Their names start with 'PowerShell.'
180+
$null = New-Item -ItemType Directory -Path "$(Pipeline.Workspace)/release"
181+
Copy-Item "$(Pipeline.Workspace)/NuGetPackages/*.nupkg" -Destination "$(Pipeline.Workspace)/release" -Exclude "PowerShell.*.nupkg" -Force -Verbose
150182
151-
$releaseVersion = '$(Version)'
152-
$globalToolPath = "$(Pipeline.Workspace)/NuGetPackages/PowerShell.$releaseVersion.nupkg"
183+
$releaseVersion = '$(Version)'
184+
$globalToolPath = "$(Pipeline.Workspace)/NuGetPackages/PowerShell.$releaseVersion.nupkg"
153185
154-
if ($releaseVersion -notlike '*-*') {
155-
# Copy the global tool package for stable releases
156-
Copy-Item $globalToolPath -Destination "$(Pipeline.Workspace)/release"
157-
}
186+
if ($releaseVersion -notlike '*-*') {
187+
# Copy the global tool package for stable releases
188+
Copy-Item $globalToolPath -Destination "$(Pipeline.Workspace)/release"
189+
}
158190
159-
Write-Verbose -Verbose "The .nupkgs below will be pushed:"
160-
Get-ChildItem "$(Pipeline.Workspace)/release" -recurse
191+
Write-Verbose -Verbose "The .nupkgs below will be pushed:"
192+
Get-ChildItem "$(Pipeline.Workspace)/release" -recurse
161193
displayName: Download and capture nupkgs
162194
condition: and(ne('${{ parameters.skipPublish }}', 'false'), succeeded())
163195

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp