|
34 | 34 | description: 'Commit-ish for liblcm repository' |
35 | 35 | required: false |
36 | 36 | default: 'master' |
37 | | -# default should be changed to the most recent base release for the release cycle |
| 37 | +# default should be changed to the most recent base release for the release cycle. |
| 38 | +# After 9.3 is stable, base_release can be computed from base_build_number, but they need to be independent for bootstrapping patches |
| 39 | +# on Jenkins-built bases. |
38 | 40 | base_release: |
39 | | - description: 'The github release for the base build artifacts' |
40 | | - default: 'build-1182' # When updating this, update fallbacks below, too. |
| 41 | + description: 'The github release for the base build artifacts (separate only for bootstrapping; should be removed after 9.3 is the stable)' |
| 42 | + default: 'build-1182' # When updating this, update base_build_number and their fallbacks below, too. |
41 | 43 | base_build_number: |
42 | | - description: 'The base build number (only for bootstrapping, should be removed after 9.3 is the stable)' |
| 44 | + description: 'The base build number' |
43 | 45 | required: false |
44 | | - default: '' |
| 46 | + default: '1182' |
45 | 47 | make_release: |
46 | 48 | description: 'Should the release be pushed to s3 - use false for test builds' |
47 | 49 | required: false |
@@ -115,14 +117,14 @@ jobs: |
115 | 117 | fetch-depth: 0 |
116 | 118 | path: 'Localizations/LCM' |
117 | 119 |
|
118 | | - - name: Download 461 targeting pack |
| 120 | + - name: Download .NET 461 targeting pack |
119 | 121 | uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 |
120 | 122 | id: downloadfile # Remember to give an ID if you need the output filename |
121 | 123 | with: |
122 | 124 | url: "https://download.microsoft.com/download/F/1/D/F1DEB8DB-D277-4EF9-9F48-3A65D4D8F965/NDP461-DevPack-KB3105179-ENU.exe" |
123 | 125 | target: public/ |
124 | 126 |
|
125 | | - - name: Install targeting pack |
| 127 | + - name: Install .NET 461 targeting pack |
126 | 128 | shell: cmd |
127 | 129 | working-directory: public |
128 | 130 | run: NDP461-DevPack-KB3105179-ENU.exe /q |
@@ -207,6 +209,7 @@ jobs: |
207 | 209 | id: build_installer |
208 | 210 | shell: powershell |
209 | 211 | run: | |
| 212 | + $base_build_number = "${{ inputs.base_build_number || '1182' }}" |
210 | 213 | Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\AppContext" |
211 | 214 | cd Build |
212 | 215 | .\build64.bat /t:BuildPatchInstaller "/property:config=release;action=test;desktopNotAvailable=true" /v:d /bl ^| tee-object -FilePath build.log |
@@ -261,35 +264,13 @@ jobs: |
261 | 264 | # Use inputs if defined but default to true |
262 | 265 | if: ${{ (inputs.make_release || 'true') == 'true' }} |
263 | 266 | shell: pwsh |
264 | | - env: |
265 | | - BASE_RELEASE: ${{ inputs.base_release || 'build-1182' }} |
266 | | - BASE_BUILD_NUMBER: ${{ inputs.base_build_number || '' }} |
267 | 267 | run: | |
268 | | - # The github action base-installer-cd will make releases with a tag build-[build number]. |
269 | | - # Manually created releases with Jenkins artifacts need to use existing tags, so we need |
270 | | - # to specify the base build number when we launch patches against Jenkins releases. |
271 | | - if ($env:BASE_BUILD_NUMBER -and $env:BASE_BUILD_NUMBER.Trim() -ne "") { |
272 | | - $baseBuildNumber = "_b$($env:BASE_BUILD_NUMBER)" |
273 | | - } elseif ($env:BASE_RELEASE -and $env:BASE_RELEASE.Trim() -ne "") { |
274 | | - if ($env:BASE_RELEASE -notmatch '^build-\d+$') { |
275 | | - throw "BASE_RELEASE must start with 'build-' (got '$env:BASE_RELEASE')" |
276 | | - } |
277 | | - $baseBuildNumber = "_b$($env:BASE_RELEASE -replace '^build-','')" |
278 | | - } else { |
279 | | - throw "Must have a base_build_number or a valid base_release to support automatic updating" |
280 | | - } |
281 | 268 | $patchPath = "${{ steps.find_patch.outputs.patch_file }}" |
282 | 269 | if (-not (Test-Path $patchPath)) { |
283 | 270 | throw "Patch file not found at $patchPath" |
284 | 271 | } |
285 | 272 | $patchFile = Split-Path $patchPath -Leaf |
286 | | - $patchDir = Split-Path $patchPath -Parent |
287 | | - # Insert baseBuildNumber before _x64.msp necessary for Automatic Update code Src\Common\FwUtils\FwUpdater.cs |
288 | | - if ($patchFile -notmatch '^(.*)(_x64\.msp)$') { |
289 | | - throw "Unexpected patch filename format: $patchFile" |
290 | | - } |
291 | | - $patchWithBaseInName = "$($Matches[1])${baseBuildNumber}$($Matches[2])" |
292 | | - $s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:FW_BUILD_NUMBER)/$patchWithBaseInName" |
| 273 | + $s3Key = "jobs/FieldWorks-Win-all-Release-Patch/$($env:FW_BUILD_NUMBER)/$patchFile" |
293 | 274 | aws s3 cp $patchPath "s3://flex-updates/$s3Key" |
294 | 275 | Write-Host "Uploaded to s3://flex-updates/$s3Key" |
295 | 276 |
|
|
0 commit comments