-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make post-versioning script also update tags on github (#3614)
* fix: make post-versioning script also update tags on github The 5.6.1 release failed to push because the `post-versioning` script did not update the tags made by `npx lerna version` - Added a new `scripts/get-version-tag.js` file that returns the current version tag by reading the version from the `@rjsf/utils` package - Added new `commit-package-changes` as a separate script to shorten the `post-versioning` script - Added new `update-version-tags` script that uses the `get-version-tags.js` script to force update the local and remote tags to the current head - Updated `package*.json` to add `cross-env` so that the setting of the CI variable in `commit-package-changes` works on all environments - Updated the `CHANGELOG.md` file accordingly * Apply suggestions from code review
- Loading branch information
1 parent
f44cf32
commit 5256392
Showing
5 changed files
with
53 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Since this file is in the `scripts` directory, the root dir of the repo is up one level | ||
const utilsPackage = path.resolve(__dirname, '../packages/utils/package.json'); | ||
|
||
// Read the file and parse it into a json object and find the version tag | ||
const packageJson = fs.readFileSync(utilsPackage); | ||
const packageObject = JSON.parse(packageJson); | ||
|
||
const { version } = packageObject; | ||
|
||
// Write the version, prefixed by the `v` used by lerna to the standard out so it can be used externally | ||
process.stdout.write(`v${version}`); |