1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-28 16:24:40 +03:00
vimr/bin/set_new_versions.sh

35 lines
852 B
Bash
Raw Normal View History

2016-10-14 13:15:32 +03:00
#!/bin/bash
2019-12-22 23:45:42 +03:00
set -Eeuo pipefail
2016-10-14 13:31:51 +03:00
2019-12-22 23:45:42 +03:00
readonly is_snapshot=${is_snapshot:?"true or false"}
2020-11-20 10:19:28 +03:00
marketing_version=${marketing_version:-""}
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
echo "### Setting versions of VimR"
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
2016-10-14 13:15:32 +03:00
2020-11-20 10:19:28 +03:00
local bundle_version
bundle_version="$(date "+%Y%m%d.%H%M%S")"
readonly bundle_version
2016-10-15 00:55:38 +03:00
2020-11-20 10:19:28 +03:00
if [[ "${is_snapshot}" == true ]]; then
2019-12-22 23:45:42 +03:00
marketing_version="SNAPSHOT-${bundle_version}"
fi
2020-11-20 10:19:28 +03:00
readonly marketing_version
2016-10-14 13:15:32 +03:00
2020-11-20 10:19:28 +03:00
pushd VimR >/dev/null
agvtool new-version -all "${bundle_version}"
agvtool new-marketing-version "${marketing_version}"
popd >/dev/null
2017-12-03 11:59:15 +03:00
2020-11-20 10:19:28 +03:00
popd >/dev/null
echo "### Set versions of VimR"
}
2017-12-03 11:59:15 +03:00
2020-11-20 10:19:28 +03:00
main