build: target for go library dependencies

Didn't notice it because vendor/ was already populated on my dev
machine, but did notice it in Docker build.

Docker build now consumes devsetup like regular user, so this should
catch future problems.

Remove remaining curl|shit functionality from lazy.sh (no checkout logic
needed anymore).

refs #35
This commit is contained in:
Christian Schwarz
2017-11-19 12:32:25 +01:00
parent e8facfe9fa
commit 2716c75ad5
5 changed files with 17 additions and 39 deletions
+3 -26
View File
@@ -13,7 +13,7 @@ step() {
echo "${bold}$1${normal}"
}
if ! type go; then
if ! type go >/dev/null; then
step "go binary not installed or not in \$PATH" 1>&2
exit 1
fi
@@ -25,23 +25,6 @@ fi
CHECKOUTPATH="${GOPATH}/src/github.com/zrepl/zrepl"
clone() {
step "Checkout sources to \$GOPATH/github.com/zrepl/zrepl"
if [ -e "$CHECKOUTPATH" ]; then
echo "${CHECKOUTPATH} already exists"
if [ ! -d "$CHECKOUTPATH" ]; then
echo "${CHECKOUTPATH} is not a directory, aborting" 1>&2
else
cd "$CHECKOUTPATH"
fi
else
mkdir -p "$GOPATH/src/github.com/zrepl"
cd "$GOPATH/src/github.com/zrepl"
git clone https://github.com/zrepl/zrepl.git
cd zrepl
fi
}
builddep() {
step "Install build depdencies using 'go get' to \$GOPATH/bin"
go get -u golang.org/x/tools/cmd/stringer
@@ -75,16 +58,15 @@ release() {
make release
}
# precheck
for cmd in "$@"; do
case "$cmd" in
clone|builddep|godep|docdep|release_bins|docs)
builddep|godep|docdep|release_bins|docs)
eval $cmd
continue
;;
devsetup)
step "Installing development dependencies"
builddep
godep
docdep
step "Development dependencies installed"
continue
@@ -96,8 +78,3 @@ for cmd in "$@"; do
esac
done
for cmd in "$@"; do
step "Step ${cmd}"
eval $cmd
done