-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add publish script and PUBLISHING.md
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Publishing | ||
|
||
Make sure you have the latest from the main branch: | ||
|
||
git pull origin main | ||
|
||
Use `npm version` to update the version number in the `package.json`. | ||
|
||
npm version {patch|minor|major} --no-git-tag-version | ||
|
||
Then run the publish script | ||
|
||
./publish.sh | ||
|
||
afterwards don't forget to update the versions to be a prerelease of the next version, so if you just published 1.1.1 then: | ||
|
||
npm version 1.1.2-dev | ||
git push --follow-tags |
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,21 @@ | ||
#!/bin/bash | ||
|
||
# get current version | ||
VERSION=$(node -e "console.log(require('./package.json').version)") | ||
|
||
# Build | ||
git checkout -b build | ||
npm run build | ||
git add dist -f | ||
git commit -m "build $VERSION" | ||
|
||
# Tag and push | ||
git tag -f v$VERSION -m "$VERSION" | ||
git push --tags git@github.com:proj4js/wkt-parser.git $VERSION | ||
|
||
# Publish | ||
npm publish | ||
|
||
# Cleanup | ||
git checkout main | ||
git branch -D build |