1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-11-24 11:37:32 +03:00

Use date as bundle version

This commit is contained in:
Tae Won Ha 2020-11-20 08:19:28 +01:00
parent 0be7ac79a2
commit 7fd8bec15e
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -1,31 +1,34 @@
#!/bin/bash
set -Eeuo pipefail
echo "### Setting versions of VimR"
pushd "$( dirname "${BASH_SOURCE[0]}" )/.." > /dev/null
readonly is_snapshot=${is_snapshot:?"true or false"}
marketing_version=${marketing_version:?"0.29.0"}
marketing_version=${marketing_version:-""}
pushd VimR > /dev/null
# bundle version
agvtool bump -all
readonly bundle_version=$(agvtool what-version | sed '2q;d' | sed -E 's/ +(.+)/\1/')
main() {
if [[ "${is_snapshot}" == false && -z "${marketing_version}" ]]; then
echo "When no snapshot, you have to set 'marketing_version', eg 0.38.1"
exit 1
fi
# marketing version
if [[ ${is_snapshot} == true ]]; then
echo "### Setting versions of VimR"
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
local bundle_version
bundle_version="$(date "+%Y%m%d.%H%M%S")"
readonly bundle_version
if [[ "${is_snapshot}" == true ]]; then
marketing_version="SNAPSHOT-${bundle_version}"
fi
readonly marketing_version
agvtool new-marketing-version ${marketing_version}
popd > /dev/null
pushd VimR >/dev/null
agvtool new-version -all "${bundle_version}"
agvtool new-marketing-version "${marketing_version}"
popd >/dev/null
for proj in 'NvimView'; do
pushd ${proj}
agvtool new-version -all ${bundle_version}
agvtool new-marketing-version ${marketing_version}
popd
done
popd >/dev/null
echo "### Set versions of VimR"
}
popd > /dev/null
echo "### Set versions of VimR"
main