forked from eksctl-io/eksctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (46 loc) · 1.47 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
built_at := $(shell date +%s)
git_commit := $(shell git describe --dirty --always)
EKSCTL_BUILD_IMAGE ?= weaveworks/eksctl:build
EKSCTL_IMAGE ?= weaveworks/eksctl:latest
.PHONY: build
build:
go build -ldflags "-X main.gitCommit=$(git_commit) -X main.builtAt=$(built_at)" ./cmd/eksctl
.PHONY: test
test:
go test -v ./pkg/... ./cmd/...
.PHONY: update-bindata
update-bindata:
go generate ./pkg/eks
.PHONY: install-bindata
install-bindata:
go get -u github.com/jteeuwen/go-bindata/...
.PHONY: eksctl-build-image
eksctl-build-image:
@-docker pull $(EKSCTL_BUILD_IMAGE)
@docker build --tag=$(EKSCTL_BUILD_IMAGE) --cache-from=$(EKSCTL_BUILD_IMAGE) ./build
.PHONY: eksctl-image
eksctl-image: eksctl-build-image
@docker build --tag=$(EKSCTL_IMAGE) --build-arg=EKSCTL_BUILD_IMAGE=$(EKSCTL_BUILD_IMAGE) ./
.PHONY: release
release: eksctl-build-image
docker run \
--env=GITHUB_TOKEN \
--env=CIRCLE_TAG \
--env=CIRCLE_PROJECT_USERNAME \
--volume=$(CURDIR):/go/src/github.com/weaveworks/eksctl \
--workdir=/go/src/github.com/weaveworks/eksctl \
$(EKSCTL_BUILD_IMAGE) \
./do-release.sh
JEKYLL := docker run --tty --rm \
--name=eksctl-jekyll \
--volume="$(CURDIR)":/usr/src/app \
--publish="4000:4000" \
starefossen/github-pages
.PHONY: server-pages
serve-pages:
@-docker rm -f eksctl-jekyll
@$(JEKYLL) jekyll serve -d /_site --watch --force_polling -H 0.0.0.0 -P 4000
.PHONY: build-page
build-pages:
@-docker rm -f eksctl-jekyll
@$(JEKYLL) jekyll build --verbose