Check for required tooling at top level

Pull common checks out to top level in preparation for the introduction
of an additional process step.
This commit is contained in:
Adam Harrison committed 2015-09-01 17:04:11 +01:00
1 parent f48a4373d1
commit 82f2f7b2b9
1 file changed
+8 -7
+8 -7
View File
@@ -96,13 +96,6 @@ publish() {
echo "== Sanity checks"
if ! which github-release >/dev/null; then
echo "Please install git-release:" >&2
echo -e "\tgo get github.com/aktau/github-release" >&2
echo "and create a git token per https://github.com/aktau/github-release" >&2
exit 1
fi
if ! [ $(git rev-list -1 $LATEST_TAG) == $(git rev-list -1 latest_release) ]; then
echo -e "\u2757 The tag latest_release does not point to the same commit as $LATEST_TAG"
exit 1
@@ -196,6 +189,14 @@ usage() {
echo "-- Publish the artefacts for the latest tag to GitHub and DockerHub"
}
# Ensure required tooling is installed
if ! which github-release >/dev/null; then
echo "Please install git-release:" >&2
echo -e "\tgo get github.com/aktau/github-release" >&2
echo "and create a git token per https://github.com/aktau/github-release" >&2
exit 1
fi
case "$1" in
build)
build