Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -5,3 +5,6 @@ ether-pool | ||
ether-pool.exe | ||
logs | ||
tools | ||
|
||
/build/_workspace/ | ||
/build/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,16 @@ | ||
# This Makefile is meant to be used by people that do not usually work | ||
# with Go source code. If you know what GOPATH is then you probably | ||
# don't need to bother with make. | ||
|
||
.PHONY: all test clean | ||
|
||
GOBIN = build/bin | ||
|
||
all: | ||
build/env.sh go get -v ./... | ||
|
||
test: all | ||
build/env.sh go test -v ./... | ||
|
||
clean: | ||
rm -fr build/_workspace/pkg/ $(GOBIN)/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ ! -f "build/env.sh" ]; then | ||
echo "$0 must be run from the root of the repository." | ||
exit 2 | ||
fi | ||
|
||
# Create fake Go workspace if it doesn't exist yet. | ||
workspace="$PWD/build/_workspace" | ||
root="$PWD" | ||
ethdir="$workspace/src/github.com/sammy007" | ||
if [ ! -L "$ethdir/open-ethereum-pool" ]; then | ||
mkdir -p "$ethdir" | ||
cd "$ethdir" | ||
ln -s ../../../../../. open-ethereum-pool | ||
cd "$root" | ||
fi | ||
|
||
# Set up the environment to use the workspace. | ||
# Also add Godeps workspace so we build using canned dependencies. | ||
GOPATH="$workspace" | ||
GOBIN="$PWD/build/bin" | ||
export GOPATH GOBIN | ||
|
||
# Run the command inside the workspace. | ||
cd "$ethdir/open-ethereum-pool" | ||
PWD="$ethdir/open-ethereum-pool" | ||
|
||
# Launch the arguments with the configured environment. | ||
exec "$@" |