Table of Contents
- Release Tool
Created by gh-md-toc
gh-md-toc README.md./release -hImportant: during release creation the script alerts you about pull requests not linked to any task. You need to check these PRs manually to ensure everything is OK.
- creates
release-X.X.Xbranch fromdevelop - creates Jira release task
{component} release X.X.X - detects new commits/PR linked to Jira tasks and links them to Jira release task
- can also link tasks to Jira version (create new or use existing one)
./release prepare- creates
release-X.X.Xbranch frommaster - cherry pick specified pull requests using their numbers to a release branch
- creates Jira release task
{component} release X.X.X - detects new commits/PR linked to Jira tasks and links them to Jira release task
- can also link tasks to Jira version (create new or use existing one)
# create hotfix without any commits
./release hotfix
# or cherry pick pull requests
./release hotfix --pr=XXX --pr=...- merge a release branch to master
- mark the merge commit with a tag
- merge
mastertodevelop - move jira tasks to final status ("Done" by default)
./release finish# ./release prepare
./release make-task
./release make-branch
./release make-links
# ./release hotfix --pr=XXX --pr=...
./release make-task
./release make-hotfix-branch --pr=XXX --pr=...
./release make-links
# ./release finish
./release merge-release
./release mark-tasks-done
# ./release merge-release
./release merge-to-master
./release merge-master-to-develop
⚠️ Done once per each local machine
Install poetry inside your virtualenv (prone to errors) or in a global python (preferable for python developers)
pip install poetry==1.0.10Install virtual env manager that you are comfortable with (like pyenv).
Example:
brew install pyenv
brew install pyenv-virtualenv
# this version is officially supports MacBook on M1 chipset
pyenv install 3.8.10Configuration choices:
- For permanent access to virtual environment put these lines to your shell config (e.g.
.bash_profile) and then reload your shell
export PATH=${HOME}/.pyenv/bin
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"-
For one time run: simply save these lines or create alias. Then, each time you want to use release_tool you will need to execute them before running release_tool commands.
-
While creating handy command ./release you can also configure shell environment
After you created ./release file, edit it to make it like that:
# these lines for pyenv and can be different for your virtual env manager
export PATH=${HOME}/.pyenv/bin
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
python -m submodules.release_tool.release $*
⚠️ Done once per each local repository
cd {{project folder}}
# choose appropriate ENV_NAME, e.g. socialfeed
pyenv virtualenv 3.8.10 {{ENV_NAME}}
pyenv local {{ENV_NAME}}add .python-version to .gitignore
git submodule update --init# activate virtual env created in previous step
cd submodules/release_tool
poetry install
# return to project folder
cd -You need to create a config and provide your auth and other info there in order to login to Github and Jira.
To get Github token Settings -> Developer settings -> Personal access tokens -> Generate new token
select option repo: Full control of private repositories
To get Jira token use this doc
# create a personal config, release_tool.yml is a name used by default, so it's strongly suggested
cp submodules/release_tool/config-stub.full.yml release_tool.yml
# add "release_tool.yml" to .gitignore To avoid typing long commands such as:
python -m submodules.release_tool.release -hMake alias to use it like this ./release [command]
echo 'python -m submodules.release_tool.release $*' > release
chmod +x release
# you can either commit "release" or add it to .gitignore
⚠️ Done only once per repository
To start using release_tool in your project add it as a git submodule.
# add release tool as a submodule
git submodule add [email protected]:TangleInc/release-tool.git submodules/release_tool
git add submodules/release_tool
git commit -m "Integrate release_tool"
git pushThen configure your local installation of release_tool check this guide 2.2. Configuration: for each local repository