File: Makefile

package info (click to toggle)
golang-github-vdemeester-shakers 0.0~git20160210.0.24d7f1d-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 192 kB
  • ctags: 158
  • sloc: sh: 159; makefile: 25
file content (37 lines) | stat: -rw-r--r-- 976 bytes parent folder | download | duplicates (3)
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
.PHONY: all

SHAKERS_MOUNT := $(if $(BIND_DIR),-v "$(CURDIR)/$(BIND_DIR):/go/src/github.com/vdemeester/shakers/$(BIND_DIR)")

GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
SHAKERS_DEV_IMAGE := shakers-dev$(if $(GIT_BRANCH),:$(GIT_BRANCH))

DOCKER_RUN_SHAKERS := docker run $(if $(CIRCLECI),,--rm) -it $(SHAKERS_ENVS) $(SHAKERS_MOUNT) "$(SHAKERS_DEV_IMAGE)"

print-%: ; @echo $*=$($*)

default: all

all: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh

test-unit: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh test-unit

validate: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh validate-gofmt validate-golint validate-govet

validate-govet: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh validate-govet

validate-golint: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh validate-golint

validate-gofmt: build
	$(DOCKER_RUN_SHAKERS) ./script/make.sh validate-gofmt

build:
	docker build -t "$(SHAKERS_DEV_IMAGE)" .

shell: build
	$(DOCKER_RUN_SHAKERS) /bin/bash