Skip to content

Commit

Permalink
Fixing make image to run on OSX (#5027)
Browse files Browse the repository at this point in the history
* Fixing `make image` to run on OSX

* Set the GOPATH if it's unset

* Use whichever bash is on the path rather than hardcoding to /bin
  • Loading branch information
gja committed Mar 27, 2020
1 parent f267bb6 commit 952dd42
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
@@ -0,0 +1,3 @@
/contrib
/wiki
/.git
7 changes: 3 additions & 4 deletions Makefile
Expand Up @@ -58,13 +58,12 @@ test:
@echo Running ./test.sh
./test.sh

image: dgraph
image:
@GOOS=linux $(MAKE) dgraph
@mkdir linux
@mv ./dgraph/dgraph ./linux/dgraph
@cp ./contrib/Dockerfile .
@docker build -t dgraph/dgraph:$(subst /,-,${BUILD_BRANCH}) .
@docker build -f contrib/Dockerfile -t dgraph/dgraph:$(subst /,-,${BUILD_BRANCH}) .
@rm -r linux
@rm Dockerfile

help:
@echo
Expand Down
2 changes: 1 addition & 1 deletion contrib/scripts/functions.sh
Expand Up @@ -22,7 +22,7 @@ function restartCluster {
make install
fi
docker ps -a --filter label="cluster=test" --format "{{.Names}}" | xargs -r docker rm -f
docker-compose -p dgraph -f $compose_file up --force-recreate --remove-orphans --detach || exit 1
GOPATH="${GOPATH:-$(go env GOPATH)}" docker-compose -p dgraph -f $compose_file up --force-recreate --remove-orphans --detach || exit 1
popd >/dev/null

$basedir/contrib/wait-for-it.sh -t 60 localhost:6180 || exit 1
Expand Down
2 changes: 1 addition & 1 deletion test.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# usage: test.sh [pkg_regex]

Expand Down

0 comments on commit 952dd42

Please sign in to comment.