1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 04:43:00 +00:00
kiwi-scp/dist/bump-version.sh

14 lines
474 B
Bash
Raw Normal View History

2020-08-26 12:57:36 +00:00
#!/bin/bash
this="$(readlink -f "${0}")"
this_dir="$(dirname "${this}")"
2022-02-22 12:24:57 +00:00
git_branch="$(git rev-parse --abbrev-ref HEAD)"
# git_tag="$(git describe --abbrev=0)"
version_str="${git_branch##*/}"
# version_str="0.2.0"
2020-08-26 12:57:36 +00:00
2022-02-22 12:24:57 +00:00
sed -ri "s/(version\s*:).*$/\1 ${version_str}/" "${this_dir}/../example/kiwi.yml"
2021-10-13 00:16:09 +00:00
sed -ri "s/(version\s*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/../pyproject.toml"
sed -ri "s/(version.*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/../kiwi_scp/config.py"