-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release-npm.yaml): set package version using set-version.js script
chore(release-npm.yaml): authenticate registry with NPM_TOKEN feat(release-npm.yaml): add support for publishing canary release feat(release-npm.yaml): add support for publishing regular release feat(set-version.js): create script to update package version in package.json
- Loading branch information
Showing
2 changed files
with
26 additions
and
6 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,19 @@ | ||
|
||
const fs = require("fs"); | ||
const path = require("path"); | ||
|
||
|
||
// usage | ||
// node set-version.js <path-to-project-root> <new-version> | ||
// e.g. node set-version.js ./packages/sdk v1.0.0 | ||
|
||
const root = process.argv[2]; // path to project root | ||
const version = process.argv[3].replace(/^v/, ""); // new version | ||
|
||
console.log(`Updating version=${version} in ${root}`); | ||
|
||
const content = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf-8")); | ||
|
||
content.version = version; | ||
|
||
fs.writeFileSync(path.join(root, "package.json"), JSON.stringify(content, null, 2)); |
d60a0b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
unkey – ./
unkey-git-main-unkey.vercel.app
unkey.vercel.app
www.unkey.dev
unkey.dev
unkey-unkey.vercel.app