1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-24 05:33:00 +00:00
kiwi-scp/bump-version.sh

11 lines
295 B
Bash
Raw Permalink Normal View History

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)"
version_str="${git_branch##*/}"
echo "${version_str}" > "${this_dir}/src/etc/version_tag"
sed -ri "s/(version\s*:).*$/\1 '${version_str}'/" "${this_dir}/example/kiwi.yml"