2018-02-22 15:07:17 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-03-27 14:30:29 -04:00
|
|
|
# Runs the Bazel workspace status command in order to ensure that the version placeholder
|
|
|
|
# will be replaced with the proper version name when building the release output.
|
|
|
|
|
2020-05-04 20:25:45 -04:00
|
|
|
versionName=$(yarn -s ng-dev release build-env-stamp | grep -e "BUILD_SCM_VERSION" | cut -d " " -f2)
|
2019-03-27 14:30:29 -04:00
|
|
|
|
2020-04-08 15:19:05 -04:00
|
|
|
if [[ ! ${versionName} =~ ^[0-9]+\.[0-9]+\.[0-9]+(-(rc|next).[0-9]+)?$ ]]; then
|
2019-03-27 14:30:29 -04:00
|
|
|
echo "ERROR: The release will currently have the following version: ${versionName}"
|
|
|
|
echo "This does not match the version format for releases to NPM."
|
|
|
|
echo ""
|
|
|
|
echo "Please ensure that the most recent commit in the current branch is tagged"
|
|
|
|
echo "with the proper version tag."
|
|
|
|
exit 1
|
|
|
|
fi
|