echo"WARNING: You can only run this script if your github api token is allowed to create and merge branches on $ETHER_REPO and $ETHER_WEB_REPO."
echo"This script automatically changes the version number in package.json and adds a text to CHANGELOG.md."
echo"When you use this script you should be in the branch that you want to release (develop probably) on latest version. Any changes that are currently not commited will be commited."
echo"-----"
# get the latest version
LATEST_GIT_TAG=$(git tag | tail-n 1)
# current environment
echo"Current environment: "
echo"- branch: $(git branch | grep'* ')"
echo"- last commit date: $(git show --quiet--pretty=format:%ad)"
echo"- current version: $LATEST_GIT_TAG"
echo"- temp dir: $TMP_DIR"
# get new version number
# format: x.x.x
echo-n"Enter new version (x.x.x): "
read VERSION
# get the message for the changelogs
read-p"Enter new changelog entries (press enter): "