mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +00:00
f041a74ff Undo some quoting that broke the test script (#160) b1c21a068 Merge pull request #158 from weaveworks/go-1-13 d5c7dd0cd Run shell-lint during CI, and fix warnings 6db1abd14 Update to Go 1.13.1 d6cc704a2 Fix comment 7139116ae Revert "Push comments to the left so they don't appear in scripts" e47e58f7b Push comments to the left so they don't appear in scripts 3945fcec8 Remove nonexistent env var GIT_TAG cd6299284 Merge pull request #156 from weaveworks/drop-quay af0eb5119 Merge pull request #157 from weaveworks/fix-image-tag-prefix-length 0b9aee4f2 Fix image-tag object name prefix length to 8 chars. 813c28fe7 Move from CircleCI 1.0 to 2.0 425cf4ef1 Move from quay.io to Dockerhub 87ccf4fd1 Merge pull request #155 from weaveworks/go-1-12 c31bc2865 Update lint script to work with Go 1.12 ed8e380d7 Update to Go 1.12.1 git-subtree-dir: tools git-subtree-split: f041a74ffbf273b627d6c960f17357108d0dbd1c
31 lines
795 B
Makefile
31 lines
795 B
Makefile
.PHONY: all clean
|
|
|
|
IMAGE_TAR=image.tar
|
|
IMAGE_NAME=weaveworks/socksproxy
|
|
GIT_REVISION := $(shell git rev-parse HEAD)
|
|
PROXY_EXE=proxy
|
|
NETGO_CHECK=@strings $@ | grep cgo_stub\\\.go >/dev/null || { \
|
|
rm $@; \
|
|
echo "\nYour go standard library was built without the 'netgo' build tag."; \
|
|
echo "To fix that, run"; \
|
|
echo " sudo go clean -i net"; \
|
|
echo " sudo go install -tags netgo std"; \
|
|
false; \
|
|
}
|
|
|
|
all: $(IMAGE_TAR)
|
|
|
|
$(IMAGE_TAR): Dockerfile $(PROXY_EXE)
|
|
docker build --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_NAME) .
|
|
docker save $(IMAGE_NAME):latest > $@
|
|
|
|
$(PROXY_EXE): *.go
|
|
go get -tags netgo ./$(@D)
|
|
go build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D)
|
|
$(NETGO_CHECK)
|
|
|
|
clean:
|
|
-docker rmi $(IMAGE_NAME)
|
|
rm -rf $(PROXY_EXE) $(IMAGE_TAR)
|
|
go clean ./...
|