Skip to content
Snippets Groups Projects
Commit 4287d474 authored by Niels de Vos's avatar Niels de Vos Committed by Michael Adam
Browse files

build: add a check for mercurial/hg


When running `make vendor` without `hg` in the path, the build fails
with the following error:

   [WARN] Unable to checkout bitbucket.org/ww/goautoneg
   [ERROR] Update failed for bitbucket.org/ww/goautoneg: hg is not installed
   [ERROR] Failed to install: hg is not installed
   make: *** [Makefile:74: vendor] Error 1

Glide needs to fetch a repository from bitbucket.org, which is a
Mercurial hosting site. The `hg` executable needs to be available to
download the requires pkgs.

Reported-by: default avatarMadhu Rajanna <mrajanna@redhat.com>
Signed-off-by: default avatarNiels de Vos <ndevos@redhat.com>
parent 77c89b60
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ ifeq ($(GOARCH),$(GOHOSTARCH))
endif
endif
GLIDEPATH := $(shell command -v glide 2> /dev/null)
HGPATH := $(shell command -v hg 2> /dev/null)
DIR=.
ifeq (master,$(BRANCH))
......@@ -69,6 +70,11 @@ ifndef GLIDEPATH
$(info by running: curl https://glide.sh/get | sh.)
$(info )
$(error glide is required to continue)
endif
ifndef HGPATH
$(info Please install mercurial/hg.)
$(info glide needs to fetch pkgs from a mercurial repository.)
$(error mercurial/hg is required to continue)
endif
echo "Installing vendor directory"
glide install -v
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment