2020-08-26 12:57:36 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
this="$(readlink -f "${0}")"
|
|
|
|
this_dir="$(dirname "${this}")"
|
|
|
|
|
|
|
|
git_branch="$(git rev-parse --abbrev-ref HEAD)"
|
2021-09-28 10:17:53 +00:00
|
|
|
git_tag="$(git describe --abbrev=0)"
|
2020-08-26 12:57:36 +00:00
|
|
|
version_str="${git_branch##*/}"
|
|
|
|
|
2021-09-28 11:23:15 +00:00
|
|
|
echo "${version_str}" > "${this_dir}/kiwi_scp/data/etc/version_tag"
|
2020-08-26 12:57:36 +00:00
|
|
|
sed -ri "s/(version\s*:).*$/\1 '${version_str}'/" "${this_dir}/example/kiwi.yml"
|
2021-09-28 11:23:15 +00:00
|
|
|
sed -ri "s/(version\s*=\s*).*$/\1\"${version_str}\"/" "${this_dir}/pyproject.toml"
|