Commit fff333fb authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add "make release" script

parent 5aa350e3
......@@ -48,6 +48,9 @@ clean: clean-workhorse clean-build
clean-workhorse:
cd ${BUILD_DIR} && rm -f gitlab-workhorse gitlab-zip-cat gitlab-zip-metadata
release:
sh _support/release.sh
.PHONY: clean-build
clean-build:
rm -rf ${BUILD_DIR}/_build
set -e
remotes='https://dev.gitlab.org/gitlab/gitlab-workhorse.git https://gitlab.com/gitlab-org/gitlab-workhorse.git'
main() {
get_version
tag_name="v${version}"
git tag -m "Version ${version}" -a ${tag_name}
git show ${tag_name}
echo
echo "Does this look OK? Enter 'yes' to push to ${remotes}"
read confirmation
if [ "x${confirmation}" != xyes ] ; then
echo "Aborting"
exit 1
fi
for r in ${remotes}; do
git push "${r}" HEAD ${tag_name}
done
}
get_version() {
v=$(sed 1q VERSION)
if ! echo "${v}" | grep -q '^[0-9]\+\.[0-9]\+\.[0-9]\+$' ; then
echo "Invalid VERSION: ${v}"
exit 1
fi
version="${v}"
}
main
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment