mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
simplify release tasks, automatic changelog
This commit is contained in:
parent
8dadf21726
commit
41d6726bed
27
README.md
27
README.md
@ -29,7 +29,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp
|
|||||||
- [✨ Code Style](#-code-style)
|
- [✨ Code Style](#-code-style)
|
||||||
- [🛳 Production](#-production)
|
- [🛳 Production](#-production)
|
||||||
- [⬆️ Releases](#️-releases)
|
- [⬆️ Releases](#️-releases)
|
||||||
- [Changelog](#changelog)
|
- [📜 Changelog](#-changelog)
|
||||||
- [🎁 Contributing](#-contributing)
|
- [🎁 Contributing](#-contributing)
|
||||||
- [🏛 License](#-license)
|
- [🏛 License](#-license)
|
||||||
|
|
||||||
@ -125,6 +125,7 @@ Builds the client for production to the `./client/build` folder, and the server
|
|||||||
From a clean `master` branch you can run any release task doing the following:
|
From a clean `master` branch you can run any release task doing the following:
|
||||||
|
|
||||||
- bumps the project version
|
- bumps the project version
|
||||||
|
- auto-generates and updates the CHANGELOG.md file from commit messages
|
||||||
- creates a Git tag
|
- creates a Git tag
|
||||||
- commits and pushes everything
|
- commits and pushes everything
|
||||||
- creates a GitHub release with commit messages as description
|
- creates a GitHub release with commit messages as description
|
||||||
@ -132,30 +133,16 @@ From a clean `master` branch you can run any release task doing the following:
|
|||||||
You can execute the script using {major|minor|patch} as first argument to bump the version accordingly:
|
You can execute the script using {major|minor|patch} as first argument to bump the version accordingly:
|
||||||
|
|
||||||
- To bump a patch version: `npm run release`
|
- To bump a patch version: `npm run release`
|
||||||
- To bump a minor version: `npm run release-minor`
|
- To bump a minor version: `npm run release minor`
|
||||||
- To bump a major version: `npm run release-major`
|
- To bump a major version: `npm run release major`
|
||||||
|
|
||||||
By creating the Git tag with these tasks, Travis will trigger a new Kubernetes deployment automatically aftr a successful tag build.
|
By creating the Git tag with these tasks, Travis will trigger a new Kubernetes live deployment automatically, after a successful tag build.
|
||||||
|
|
||||||
For the GitHub releases steps a GitHub personal access token, exported as `GITHUB_TOKEN` is required. [Setup](https://github.com/release-it/release-it#github-releases)
|
For the GitHub releases steps a GitHub personal access token, exported as `GITHUB_TOKEN` is required. [Setup](https://github.com/release-it/release-it#github-releases)
|
||||||
|
|
||||||
## Changelog
|
## 📜 Changelog
|
||||||
|
|
||||||
See the [CHANGELOG.md](./CHANGELOG.md) file.
|
See the [CHANGELOG.md](./CHANGELOG.md) file. This file is auto-generated during the above mentioned release process.
|
||||||
|
|
||||||
This file is auto-generated from commit & PR messages upon running:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run changelog
|
|
||||||
```
|
|
||||||
|
|
||||||
This will update the CHANGELOG.md file with commit messages in a nice format. Doing a release will not automatically update that changelog file. So after every release this needs to done with the above command and simply committed back into `master`.
|
|
||||||
|
|
||||||
For convenience, you can use this command which updates the CHANGELOG.md file, commits the result, and pushes changes to `master`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run changelog:commit
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🎁 Contributing
|
## 🎁 Contributing
|
||||||
|
|
||||||
|
24
package.json
24
package.json
@ -16,12 +16,8 @@
|
|||||||
"lint:js": "eslint --ignore-path .gitignore --ignore-path .prettierignore --ext .ts,.tsx .",
|
"lint:js": "eslint --ignore-path .gitignore --ignore-path .prettierignore --ext .ts,.tsx .",
|
||||||
"lint:fix": "eslint --fix --ignore-path .gitignore --ignore-path .prettierignore --ext .ts,.tsx .",
|
"lint:fix": "eslint --fix --ignore-path .gitignore --ignore-path .prettierignore --ext .ts,.tsx .",
|
||||||
"lint": "npm run lint:js && npm run lint:css",
|
"lint": "npm run lint:js && npm run lint:css",
|
||||||
"release": "./node_modules/release-it/bin/release-it.js --git.tagName='v${version}' --github.release --non-interactive --no-npm.publish",
|
"release": "release-it --non-interactive",
|
||||||
"release-minor": "./node_modules/release-it/bin/release-it.js minor --git.tagName='v${version}' --github.release --non-interactive --no-npm.publish",
|
"changelog": "auto-changelog -p"
|
||||||
"release-major": "./node_modules/release-it/bin/release-it.js major --git.tagName='v${version}' --github.release --non-interactive --no-npm.publish",
|
|
||||||
"changelog": "auto-changelog",
|
|
||||||
"changelog:commit": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog' && git push",
|
|
||||||
"beforeStage": "npm run changelog"
|
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -45,5 +41,21 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/oceanprotocol/commons"
|
"url": "https://github.com/oceanprotocol/commons"
|
||||||
|
},
|
||||||
|
"release-it": {
|
||||||
|
"scripts": {
|
||||||
|
"beforeStart": "npm test",
|
||||||
|
"beforeStage": "npm run changelog",
|
||||||
|
"afterRelease": "echo Successfully released ${name} v${version} to ${repo.repository}."
|
||||||
|
},
|
||||||
|
"git": {
|
||||||
|
"tagName": "v${version}"
|
||||||
|
},
|
||||||
|
"github": {
|
||||||
|
"release": true
|
||||||
|
},
|
||||||
|
"npm": {
|
||||||
|
"publish": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user