mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
remove bumpversion, add documentation
This commit is contained in:
parent
48c48d530b
commit
499e31991b
@ -1,7 +0,0 @@
|
|||||||
[bumpversion]
|
|
||||||
current_version = 0.1.2
|
|
||||||
|
|
||||||
[bumpversion:file:package.json]
|
|
||||||
search = "version": "{current_version}",
|
|
||||||
replace = "version": "{new_version}",
|
|
||||||
|
|
@ -12,14 +12,6 @@ notifications:
|
|||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
- provider: releases
|
|
||||||
skip_cleanup: true
|
|
||||||
api_key:
|
|
||||||
secure: "txBAvszimYY9QqenZckMI+fC/qhnsD4zAUcULs/8D8rGaW7+lCGClV0MShh5T8o/aVbSRctFaHeEESGAuedxmETsQnkBe1XekE1WiXqADzcOp5rrfzIZruED50Zy9dafZGHNJVJax1J1BPb2GePhYg51WX/0OuKb0h5J5tZQvLXVHhtc5hNx5/0kzQNQpyjf8MA/MdZj/Qh5wPx8eKmdt+yTUfqFyzYwh7nE2U+KsHzC5CZdwGXnqZBsWqrNX+l35oFcAu7M7kIzm5RRugrqpmQQqMNDVka1cj3UW0VWve7V5IcnQCfRnat7wXKLPEmC/tBUB3LNRi4X+YKxkkcRaFStJeJw5sQhEK10Jso71p35u0X/AyNVQfzMZou1fFrJsqNGmlB9c/n4zHyepY6jOpEQDBiggvCcf0lvPrJmJvKW9+8HhVBlf9Pre1TmsAciw2jjIrClaTIF/vYk7C/ix37OcMVrijoH8yMOZEZLvpXJhLN/IMvLHyxduvO7ClzT4eWNSoduyZvYB8kGz5OIml7gCtSLQ0qM1We8u5lHTHhqFHChFlgK2F90NBaZV4U1DkxerQgY+EiCVrrDPHAcHmliKgzzYqBfOxsfCJ/odBwg+ASGBy+yLFpCTw5OB1Ap+fvwInz1eQQ0rTP44+24Kt0Nt4lJcFQp3bE+xyzUdk0="
|
|
||||||
on:
|
|
||||||
tags: true
|
|
||||||
all_branches: true
|
|
||||||
|
|
||||||
- provider: script
|
- provider: script
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
script: bash -ex ./scripts/deploy_on_k8s.sh
|
script: bash -ex ./scripts/deploy_on_k8s.sh
|
||||||
|
25
README.md
25
README.md
@ -25,7 +25,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp
|
|||||||
- [🛳 Production](#-production)
|
- [🛳 Production](#-production)
|
||||||
- [👩🔬 Testing](#-testing)
|
- [👩🔬 Testing](#-testing)
|
||||||
- [🎁 Contributing](#-contributing)
|
- [🎁 Contributing](#-contributing)
|
||||||
- [⬆️ Bumping version](#-bumping-version)
|
- [⬆️ Releases](#️-releases)
|
||||||
- [✨ Code Style](#-code-style)
|
- [✨ Code Style](#-code-style)
|
||||||
- [🏛 License](#-license)
|
- [🏛 License](#-license)
|
||||||
|
|
||||||
@ -82,14 +82,25 @@ Launches the test runner in the interactive watch mode.
|
|||||||
|
|
||||||
See the page titled "[Ways to Contribute](https://docs.oceanprotocol.com/concepts/contributing/)" in the Ocean Protocol documentation.
|
See the page titled "[Ways to Contribute](https://docs.oceanprotocol.com/concepts/contributing/)" in the Ocean Protocol documentation.
|
||||||
|
|
||||||
## ⬆️ Bumping version
|
## ⬆️ Releases
|
||||||
|
|
||||||
Use the `bumpversion.sh` script to bump the project version. You can execute the script using {major|minor|patch} as first argument to bump the version accordingly:
|
Running any release task does the following:
|
||||||
- To bump the patch version: `./bumpversion.sh patch`
|
|
||||||
- To bump the minor version: `./bumpversion.sh minor`
|
|
||||||
- To bump the major version: `./bumpversion.sh major`
|
|
||||||
|
|
||||||
After that, you need to commit, push and git tag the commit if desired/needed.
|
- bumps the project version
|
||||||
|
- creates a Git tag
|
||||||
|
- updates CHANGELOG.md file with commit messages
|
||||||
|
- commits and pushes everything
|
||||||
|
- creates a GitHub release with commit messages as description
|
||||||
|
|
||||||
|
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 minor version: `npm run release-minor`
|
||||||
|
- 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.
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
## ✨ Code Style
|
## ✨ Code Style
|
||||||
|
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
usage(){
|
|
||||||
echo "Usage: $0 {major|minor|patch} [--tag]"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! [ -x "$(command -v bumpversion)" ]; then
|
|
||||||
echo 'Error: bumpversion is not installed.' >&2
|
|
||||||
exit 1
|
|
||||||
elif ! git diff-index --quiet HEAD -- >/dev/null 2>&1; then
|
|
||||||
echo 'There are local changes in your the git repository. Please commit or stash them before bumping version.' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$#" -lt 1 ]; then
|
|
||||||
echo "Illegal number of parameters"
|
|
||||||
usage
|
|
||||||
elif [[ $1 != 'major' && $1 != 'minor' && $1 != 'patch' ]]; then
|
|
||||||
echo 'First argument must be {major|minor|patch}'
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $2 == '--tag' ]]; then
|
|
||||||
if git branch --contains $(git rev-parse --verify HEAD) | grep -E 'master'; then
|
|
||||||
bumpversion --tag --commit $1
|
|
||||||
else
|
|
||||||
echo "Only master tags can be tagged"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
bumpversion $1
|
|
||||||
fi
|
|
@ -15,10 +15,11 @@
|
|||||||
"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": "npm run changelog && git add . && git commit -m 'update changelog' && ./node_modules/release-it/bin/release-it.js --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
"release": "./node_modules/release-it/bin/release-it.js --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
||||||
"release-minor": "npm run changelog && git add . && git commit -m 'update changelog' && ./node_modules/release-it/bin/release-it.js minor --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
"release-minor": "./node_modules/release-it/bin/release-it.js minor --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
||||||
"release-major": "npm run changelog && git add . && git commit -m 'update changelog' && ./node_modules/release-it/bin/release-it.js major --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
"release-major": "./node_modules/release-it/bin/release-it.js major --src.tagName='v%s' --github.release --non-interactive --no-npm.publish",
|
||||||
"changelog": "auto-changelog"
|
"changelog": "auto-changelog",
|
||||||
|
"beforeStage": "npm run changelog"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user