-
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.
Run RTK publish CI examples on built artifact
- Loading branch information
1 parent
d698e38
commit 2131254
Showing
2 changed files
with
81 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import path from 'path' | ||
import fs from 'fs' | ||
import { fileURLToPath } from 'node:url' | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
|
||
const gitRev = process.argv[2] | ||
|
||
const packagePath = path.join(__dirname, '../package.json') | ||
const pkg = JSON.parse(fs.readFileSync(packagePath)) | ||
|
||
pkg.version = `${pkg.version}-${gitRev}` | ||
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2)) |