Skip to content

Commit

Permalink
Fix windows release tag issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fayeed committed Oct 23, 2023
1 parent 2c2cc6b commit d350525
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eject": "vite eject",
"build": "vite build",
"package-ad4m": "run-script-os",
"package-ad4m:windows": "cargo clean && yarn run build && yarn tauri build --verbose",
"package-ad4m:windows": "cargo clean && powershell -ExecutionPolicy Bypass -File ./scripts/patch-prerelease-tags.ps1 && yarn run build && yarn tauri build --verbose && powershell -ExecutionPolicy Bypass -File ./scripts/reverse-patch-prerelease-tags.ps1",
"package-ad4m:macos": "yarn run build && yarn tauri build --verbose",
"package-ad4m:linux": "yarn run build && ./scripts/patch-safe-buffer.sh && yarn tauri build --verbose && ./scripts/reverse-patch-safe-buffer.sh"
},
Expand Down
5 changes: 5 additions & 0 deletions ui/scripts/patch-prerelease-tags.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(Get-Content -Path 'package.json' -Raw) -replace '"version": "(.*)-prerelease",', '"version": "$1",' | Set-Content -Path 'package.json'

(Get-Content -Path 'src-tauri/tauri.conf.json' -Raw) -replace '"version": "(.*)-prerelease"', '"version": "$1"' | Set-Content -Path 'src-tauri/tauri.conf.json'

(Get-Content -Path 'src-tauri/Cargo.toml' -Raw) -replace 'version = "(.*)-prerelease\.0"', 'version = "$1"' | Set-Content -Path 'src-tauri/Cargo.toml'
5 changes: 5 additions & 0 deletions ui/scripts/reverse-patch-prerelease-tags.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(Get-Content -Path 'package.json' -Raw) -replace '"version": "(.*)",', '"version": "$1-prerelease",' | Set-Content -Path 'package.json'

(Get-Content -Path 'src-tauri/tauri.conf.json' -Raw) -replace '"version": "(.*)",', '"version": "$1-prerelease",' | Set-Content -Path 'src-tauri/tauri.conf.json'

(Get-Content -Path 'src-tauri/Cargo.toml' -Raw) -replace 'version = "(.*)"', 'version = "$1-prerelease.0"' | Set-Content -Path 'src-tauri/Cargo.toml'

0 comments on commit d350525

Please sign in to comment.