Skip to content

Commit b8835e1

Browse files
committed
Add Version parameter to Finish-Release.ps1 for versioned file naming
1 parent 9a76202 commit b8835e1

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ In AWS, a `c5a.xlarge` instance running Windows Server 2022 will do.
7272
1. Extract the corresponding Phase 1 artifact to your local workspace in `src/SqlNotebook/bin/publish/`.
7373
2. Run Phase 2 with automated code signing:
7474
```powershell
75-
powershell.exe ps1/Finish-Release.ps1 -Platform <platform> -SigntoolPath "<full path to signtool.exe>" -SigntoolSha1 "<SHA1 hash>"
75+
powershell.exe ps1/Finish-Release.ps1 -Platform <platform> -SigntoolPath "<full path to signtool.exe>" -SigntoolSha1 "<SHA1 hash>" -Version "<version>"
7676
```
7777
You will be prompted to enter your HSM password when signtool runs for both the executable and MSI.
7878
3. The script will automatically:
@@ -81,15 +81,15 @@ In AWS, a `c5a.xlarge` instance running Windows Server 2022 will do.
8181
- Generate the MSI installer
8282
- Sign the MSI installer
8383
- Create properly named output files in `release-output/`:
84-
- `SqlNotebook-<platform>.zip`
85-
- `SqlNotebook-<platform>.msi`
84+
- `SqlNotebook-<platform>-<version>.zip`
85+
- `SqlNotebook-<platform>-<version>.msi`
8686
8787
- Test the zip and MSI files from the `release-output/` directory.
8888
- Create release on GitHub, upload the four files from `release-output/`:
89-
- `SqlNotebook-x64.zip`
90-
- `SqlNotebook-x64.msi`
91-
- `SqlNotebook-arm64.zip`
92-
- `SqlNotebook-arm64.msi`
89+
- `SqlNotebook-x64-<version>.zip`
90+
- `SqlNotebook-x64-<version>.msi`
91+
- `SqlNotebook-arm64-<version>.zip`
92+
- `SqlNotebook-arm64-<version>.msi`
9393
- Release settings:
9494
- Let GitHub create a new tag, name it `vX.X.X`.
9595
- Set release title to `vX.X.X`.

project/TASKS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
- [x] SqlNotebook-x64.msi (WiX installer)
3333
- [x] SqlNotebook-x64.zip (portable zip)
3434
- [x] Update `CONTRIBUTING.md` accordingly. The developer will have to enter their password interactively when prompted by `signtool`, but your script will take care of the rest. Then the developer will attach those four files to the GitHub release and proceed with the rest of the release process.
35-
- [ ] I want the final release files to be named like `SqlNotebook-arm64-2.0.0.msi` where 2.0.0 is the version number. Add `-Version` as a required parameter to `Finish-Release.ps1` and use it to rename the final files.
36-
- [ ] Update `CONTRIBUTING.md` accordingly.
35+
- [x] I want the final release files to be named like `SqlNotebook-arm64-2.0.0.msi` where 2.0.0 is the version number. Add `-Version` as a required parameter to `Finish-Release.ps1` and use it to rename the final files.
36+
- [x] Update `CONTRIBUTING.md` accordingly.

ps1/Finish-Release.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ param (
44
[Parameter(Mandatory=$true)]
55
[string]$SigntoolPath,
66
[Parameter(Mandatory=$true)]
7-
[string]$SigntoolSha1
7+
[string]$SigntoolSha1,
8+
[Parameter(Mandatory=$true)]
9+
[string]$Version
810
)
911

1012
$ErrorActionPreference = "Stop"
@@ -152,8 +154,8 @@ Write-Output "SqlNotebook.msi signed successfully."
152154
# Copy final files to output directory with proper naming
153155
#
154156

155-
$finalZipName = "SqlNotebook-$Platform.zip"
156-
$finalMsiName = "SqlNotebook-$Platform.msi"
157+
$finalZipName = "SqlNotebook-$Platform-$Version.zip"
158+
$finalMsiName = "SqlNotebook-$Platform-$Version.msi"
157159

158160
Copy-Item $zipFilePath "$outputDir\$finalZipName"
159161
Copy-Item $msiFilePath "$outputDir\$finalMsiName"

0 commit comments

Comments
 (0)