diff --git a/bump-version.sh b/bump-version.sh new file mode 100755 index 0000000..a9cd35a --- /dev/null +++ b/bump-version.sh @@ -0,0 +1,10 @@ +#!/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" diff --git a/example/kiwi.yml b/example/kiwi.yml index 1ec35f1..56be52f 100644 --- a/example/kiwi.yml +++ b/example/kiwi.yml @@ -2,7 +2,7 @@ # kiwi-scp instance configuration # ################################### -version: '0.1.2' +version: '0.1.3' runtime: storage: /tmp/kiwi diff --git a/kiwi b/kiwi index 9a19718..bf9da3c 100755 --- a/kiwi +++ b/kiwi @@ -12,7 +12,7 @@ KIWI_VERSION_TAG="etc/version_tag" # dependencies to run kiwi-scp KIWI_DEPENDENCIES="python3 pipenv less docker docker-compose" # base install dir -KIWI_BASEDIR="${HOME}/.local/lib/kiwi-scp" +KIWI_BASEDIR="${HOME}/.cache/kiwi-scp" # per-user env setup script KIWI_PROFILE="${HOME}/.kiwi_profile" @@ -122,7 +122,7 @@ fi # run check for new kiwi version if [ "${run_kiwi_check}" = "yes" ]; then # hash this script and the master version - hash_local="$(md5sum <"$(readlink "${0}")")" + hash_local="$(md5sum <"$(readlink -f "${0}")")" hash_remote="$(curl --proto '=https' --tlsv1.2 -sSfL "${KIWI_URI}" | md5sum)" # warn if different diff --git a/src/etc/version_tag b/src/etc/version_tag index 8294c18..b1e80bb 100644 --- a/src/etc/version_tag +++ b/src/etc/version_tag @@ -1 +1 @@ -0.1.2 \ No newline at end of file +0.1.3 diff --git a/src/kiwi-config.py b/src/kiwi-scp.py similarity index 100% rename from src/kiwi-config.py rename to src/kiwi-scp.py