Skip to content

Commit

Permalink
Add release handling and npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Jan 24, 2024
1 parent 81b3710 commit ecaed7f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ This node module provides [a web service](#web-service), a [command line client]
- [mapEntity](#mapentity)
- [mapMapping](#mapmapping)
- [Contributing](#contributing)
- [Publish](#publish)
- [License](#license)

[mapEntity]: #mapentity
Expand Down Expand Up @@ -475,11 +476,19 @@ from a single Wikidata item to a concept in another concept scheme.
## Contributing
See <https://github.com/gbv/wikidata-jskos>.
PRs accepted against the `dev` branch.
For debugging set environment variable `DEBUG`, also possible via file `.env`:
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
DEBUG=*
### Publish
**For maintainers only**
Never work on the main branch directly. Always make changes on `dev` and then run the release script:
```bash
npm run release:patch # or minor or major
```
## License
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"test-watch": "mocha --watch",
"lint": "eslint '*.js' '**/*.js'",
"fix": "eslint --fix '*.js' '**/*.js'",
"lint-staged": "lint-staged"
"lint-staged": "lint-staged",
"release": "[[ \"$(git rev-parse --abbrev-ref HEAD)\" == \"dev\" ]] && git pull && npm test && npm version $SEMVER && git push && git checkout main && git merge dev && git push --follow-tags && git checkout dev",
"release:patch": "SEMVER=patch npm run release",
"release:minor": "SEMVER=minor npm run release",
"release:major": "SEMVER=major npm run release"
},
"files": [
"lib/*",
Expand Down

0 comments on commit ecaed7f

Please sign in to comment.