Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
dist/redrob-windows-x64/bin/redrob.exe
dist/redrob-windows-x64-baseline/bin/redrob.exe
REDROB_WINDOWS_INSTALLER: >-
dist/redrob-code-x64-setup.exe
dist/redrob-code-${{ needs.version.outputs.version }}-windows-x64-setup.exe
dist/redrob-code-${{ needs.version.outputs.version }}-windows-x64.msi
dist/redrob-code-${{ needs.version.outputs.version }}-windows-arm64.msi
steps:
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
"/O${{ github.workspace }}\dist" `
"${{ github.workspace }}\installer\windows\redrob-code.iss"
if ($LASTEXITCODE -ne 0) { throw "ISCC failed with $LASTEXITCODE" }
$setup = "${{ github.workspace }}\dist\redrob-code-x64-setup.exe"
$setup = "${{ github.workspace }}\dist\redrob-code-${{ needs.version.outputs.version }}-windows-x64-setup.exe"
if (-not (Test-Path $setup)) { throw "the installer was not produced at $setup" }
Write-Host "built $((Get-Item $setup).Length) bytes"

Expand Down Expand Up @@ -430,7 +430,7 @@ jobs:
name: release-windows
path: |
dist/redrob-windows-*.zip
dist/redrob-code-x64-setup.exe
dist/redrob-code-${{ needs.version.outputs.version }}-windows-x64-setup.exe
dist/redrob-code-*-windows-*.msi
if-no-files-found: error

Expand Down
7 changes: 5 additions & 2 deletions installer/windows/redrob-code.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; Redrob Code Windows installer.
;
; Produces `redrob-code-x64-setup.exe`: a click-to-run installer, so Windows is not the one
; Produces `redrob-code-<version>-windows-x64-setup.exe`: a click-to-run installer, so Windows is not the one
; platform where the only way in is to paste a PowerShell one-liner. That asymmetry is what this
; exists to remove -- kiro.dev hands a Windows user a signed .exe, and until now this project
; handed them a `curl` command and an archive whose name did not even exist in the release.
Expand Down Expand Up @@ -60,7 +60,10 @@ UninstallDisplayName=Redrob Code
UninstallFilesDir={localappdata}\Redrob\uninstall

OutputDir=.
OutputBaseFilename=redrob-code-x64-setup
; `<repo>-<version>-<os>-<arch>-setup`: the asset-name convention Redrob Launcher parses
; (`redrob-code-0.6.8-windows-x64-setup.exe`), so a Windows user and the launcher see the same
; version in the file name as in the release tag.
OutputBaseFilename=redrob-code-{#AppVersion}-windows-x64-setup
Compression=lzma2/max
SolidCompression=yes
WizardStyle=modern
Expand Down
4 changes: 2 additions & 2 deletions packages/redrob/src/installation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function isCurlInstall(execPath: string) {
* directory deliberately, so recognising it is a location check like `isCurlInstall`'s rather than
* a guess. It is a separate method because the two are not interchangeable at upgrade time: a
* curl install is replaced by re-running `install.sh`, while this one is replaced by running the
* next `redrob-code-x64-setup.exe`, and an in-place overwrite of a running `.exe` is not something
* next `redrob-code-<version>-windows-x64-setup.exe`, and an in-place overwrite of a running `.exe` is not something
* Windows permits anyway.
*
* Without this the installer's own binary answers `unknown`, which refuses to upgrade at all -- so
Expand Down Expand Up @@ -256,7 +256,7 @@ const layer: Layer.Layer<Service, never, HttpClient.HttpClient | AppProcess.Serv
// So this is a refusal WITH a next step, which is different from `unknown`: we know
// exactly how this install got here and exactly what replaces it.
return yield* new UpgradeFailedError({
stderr: `redrob at ${process.execPath} was installed by the Windows installer, so it is upgraded by running the new installer rather than in place. Download redrob-code-x64-setup.exe for ${target} from ${RELEASE_DOWNLOAD_BASE}/tag/v${target}`,
stderr: `redrob at ${process.execPath} was installed by the Windows installer, so it is upgraded by running the new installer rather than in place. Download redrob-code-${target}-windows-x64-setup.exe from ${RELEASE_DOWNLOAD_BASE}/tag/v${target}`,
})
default:
// `unknown`. Re-running install.sh over a binary we did not place would write into
Expand Down
2 changes: 1 addition & 1 deletion packages/redrob/test/installation/launcher-assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("launcher asset names", () => {
for (const bad of [
"redrob-linux-x64.tar.gz", // no version, stem `redrob`
"redrob-darwin-arm64.zip",
"redrob-code-x64-setup.exe", // the launcher does not install an exe
"redrob-code-0.5.1-windows-x64-setup.exe", // the launcher does not install an exe
"redrob-code-v0.5.1-linux-x86_64.tar.gz", // leading v
"redrob-code-0.5.1-linux-x64.tar.gz", // x64 is not a linux token
"redrob-code-0.5.1-linux-amd64.tar.gz",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ describe("the Windows installer definition", () => {
})

test("produces the asset name the release and the console both expect", () => {
expect(definition).toContain("OutputBaseFilename=redrob-code-x64-setup")
expect(definition).toContain("OutputBaseFilename=redrob-code-{#AppVersion}-windows-x64-setup")
})
})
Loading