File tree Expand file tree Collapse file tree 3 files changed +38
-14
lines changed Expand file tree Collapse file tree 3 files changed +38
-14
lines changed Original file line number Diff line number Diff line change 4646 Expand-Archive -Path "denort-windows.zip" -DestinationPath "."
4747
4848 - name : Run patchver for Windows
49- shell : pwsh
5049 run : |
51- deno install -g -A -n patchver https://deno.land/x/[email protected] /cli.ts 52- $CHANNEL="${{github.event.inputs.releaseKind}}"
53- # Patch deno.exe
54- Move-Item -Path "deno.exe" -Destination "deno_original.exe"
55- patchver "deno_original.exe" "deno.exe" $CHANNEL
56- # Patch denort.exe
57- Move-Item -Path "denort.exe" -Destination "denort_original.exe"
58- patchver "denort_original.exe" "denort.exe" $CHANNEL
59-
60- # Rename files to match expected pattern
61- Move-Item -Path "deno.exe" -Destination "deno-x86_64-pc-windows-msvc-$CHANNEL.exe"
62- Move-Item -Path "denort.exe" -Destination "denort-x86_64-pc-windows-msvc-$CHANNEL.exe"
50+ deno run -A ./tools/release/promote_to_release_windows.ts ${{github.event.inputs.releaseKind}}
6351
6452 - name : Authenticate with Azure
6553 uses : azure/login@v1
Original file line number Diff line number Diff line change 55
66import { $ } from "jsr:@david/[email protected] " ; 77import { gray } from "jsr:@std/fmt@1/colors" ;
8- import { patchver } from "jsr:@deno/patchver@0.2 .0" ;
8+ import { patchver } from "jsr:@deno/patchver@0.3 .0" ;
99
1010const SUPPORTED_TARGETS = [
1111 "aarch64-apple-darwin" ,
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S deno run -A
2+ // Copyright 2018-2025 the Deno authors. MIT license.
3+
4+ // deno-lint-ignore-file no-console
5+
6+ import { patchver } from "jsr:@deno/[email protected] " ; 7+
8+ const CHANNEL = Deno . args [ 0 ] ;
9+ if ( CHANNEL !== "rc" && CHANNEL !== "lts" ) {
10+ throw new Error ( `Invalid channel: ${ CHANNEL } ` ) ;
11+ }
12+
13+ const BINARIES = [ "deno.exe" , "denort.exe" ] ;
14+
15+ async function patchBinary ( inputPath : string , channel : string ) {
16+ console . log ( `Patching ${ inputPath } ...` ) ;
17+
18+ const input = await Deno . readFile ( inputPath ) ;
19+ const output = patchver ( input , channel ) ;
20+
21+ // Extract filename without extension and create output name
22+ const baseName = inputPath . replace ( / \. e x e $ / , "" ) ;
23+ const outputPath = `${ baseName } -x86_64-pc-windows-msvc-${ channel } .exe` ;
24+
25+ await Deno . writeFile ( outputPath , output ) ;
26+ console . log ( `Created ${ outputPath } ` ) ;
27+ }
28+
29+ async function main ( ) {
30+ for ( const binary of BINARIES ) {
31+ await patchBinary ( binary , CHANNEL ) ;
32+ }
33+ console . log ( "All Windows binaries patched successfully!" ) ;
34+ }
35+
36+ await main ( ) ;
You can’t perform that action at this time.
0 commit comments