mirror of
https://github.com/hashicorp/terraform.git
synced 2026-03-21 10:00:09 -04:00
31 lines
500 B
Bash
31 lines
500 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
# Copyright IBM Corp. 2014, 2026
|
||
|
|
# SPDX-License-Identifier: BUSL-1.1
|
||
|
|
|
||
|
|
|
||
|
|
set -uo pipefail
|
||
|
|
|
||
|
|
function usage {
|
||
|
|
cat <<-'EOF'
|
||
|
|
Usage: ./version-bump.sh <version>
|
||
|
|
|
||
|
|
Description:
|
||
|
|
This script will update the version/VERSION file with the given version.
|
||
|
|
EOF
|
||
|
|
}
|
||
|
|
|
||
|
|
function update_version {
|
||
|
|
VERSION="${1:-}"
|
||
|
|
|
||
|
|
if [[ -z "$VERSION" ]]; then
|
||
|
|
echo "missing at least one of [<version>] arguments"
|
||
|
|
usage
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo "$VERSION" > version/VERSION
|
||
|
|
}
|
||
|
|
|
||
|
|
update_version "$@"
|
||
|
|
exit $?
|