diff options
author | Giuseppe Lavagetto <glavagetto@wikimedia.org> | 2017-06-01 15:06:39 -0700 |
---|---|---|
committer | Chad Horohoe <chadh@wikimedia.org> | 2017-06-01 15:06:45 -0700 |
commit | a3124c04207a5fb7815a407f1978a91c54d22f7b (patch) | |
tree | 2e0c6e6d96de671180b2bfc78b6d8aa066d65de3 | |
parent | d0266214e0da18dc53d6acb14c90ecfda0448e44 (diff) | |
download | blubber-a3124c04207a5fb7815a407f1978a91c54d22f7b.tar.gz |
Add Makefile
Summary:
Added a Makefile so you don't need any special mangling of your go path
Test Plan:
None
Reviewers: dduvall, mmodell, #release-engineering-team
Reviewed By: mmodell
Subscribers: Joe
Tags: #release-engineering-team
Revert Plan:
None
Differential Revision: https://phabricator.wikimedia.org/D671
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | README.md | 10 |
2 files changed, 25 insertions, 5 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b482cb3 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +export GOPATH=$(CURDIR)/.build +PACKAGE := phabricator.wikimedia.org/source/blubber.git +export BUILD_DIR=$(GOPATH)/src/$(PACKAGE) +BINARY :=$(CURDIR)/bin/blubber + +all: clean bin/blubber + +clean: + rm -rf $(CURDIR)/.build + rm -rf $(BINARY) + +bin/blubber: + mkdir -p $(dir $(BUILD_DIR)) + ln -s $(CURDIR) $(BUILD_DIR) + cd $(BUILD_DIR) && go get ./... + cd $(BUILD_DIR) && go build -v -i + mkdir -p $(CURDIR)/bin && mv $(BUILD_DIR)/blubber.git $(BINARY) + + +.PHONY: all clean @@ -97,9 +97,9 @@ given variant. blubber config.yaml variant You can see the result of the example configuration by cloning this repo and -running (assuming you have go and your GOPATH set up properly): +running (assuming you have go): - go build - ./blubber blubber blubber.example.yaml development - ./blubber blubber blubber.example.yaml test - ./blubber blubber blubber.example.yaml production + make + ./bin/blubber blubber blubber.example.yaml development + ./bin/blubber blubber blubber.example.yaml test + ./bin/blubber blubber blubber.example.yaml production |