-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TS issues in
writeGitVersion
(#375)
- Loading branch information
1 parent
58c45ac
commit 9161c48
Showing
5 changed files
with
432 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env node --import=tsx | ||
|
||
import * as fs from 'node:fs' | ||
import * as path from 'node:path' | ||
|
||
const gitRev = process.argv[2] | ||
|
||
const packagePath = path.join(import.meta.dirname, '../package.json') | ||
const pkg = JSON.parse(fs.readFileSync(packagePath, 'utf8')) | ||
|
||
pkg.version = `${pkg.version}-${gitRev}` | ||
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2)) |
Oops, something went wrong.