Skip to content

Commit

Permalink
Add build for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
zjkmxy committed Aug 10, 2024
1 parent f61d82f commit f6147b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build-meta.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$revision = "$(git describe --tags --abbrev=0) $(git rev-parse --short HEAD)"
$timestamp = Get-Date -UFormat %s
"{`"revision`":`"$revision`",`"timestamp`":$timestamp}" | Out-File -FilePath ./public/build-meta.json
@"
export const REVISION = '$revision'
// eslint-disable-next-line @typescript-eslint/no-loss-of-precision, prettier/prettier
export const TIMESTAMP = $timestamp
"@ | Out-File -FilePath ./src/build-meta.ts
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "./build-meta.bash && tsc && vite build",
"build-win": "pwsh ./build-meta.ps1 && tsc && vite build",
"lint": "eslint . --max-warnings 0",
"preview": "vite preview",
"peer-server": "peerjs --port 8000 --key peerjs --path /aincraft --allow_discovery true",
Expand Down

0 comments on commit f6147b5

Please sign in to comment.