diff --git a/README.md b/README.md index 929de02..40439c2 100644 --- a/README.md +++ b/README.md @@ -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 @@ -475,11 +476,19 @@ from a single Wikidata item to a concept in another concept scheme. ## Contributing -See . +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 diff --git a/package.json b/package.json index a1957e7..98a6e09 100644 --- a/package.json +++ b/package.json @@ -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/*",