Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile.build.mk - gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3202b0def3a53b041dc6ff7250c1d9260f7d035c (plain)
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
GO_BUILD_TAGS   := continuous_profiler_stackdriver

.PHONY: all setup generate-mocks build clean

all: gitlab-pages

setup: .GOPATH/.ok
	mkdir -p bin/
	# Installing dev tools defined in go.tools
	awk '/_/ {print $$2}' ./tools/main.go | xargs -tI % go install ${V:+-v -x} -modfile=tools/go.mod -mod=mod %

cisetup: .GOPATH/.ok
	mkdir -p bin/
	# Installing dev tools defined in go.tools
	awk '/_/ {print $$2}' ./tools/main.go | grep -v -e mockgen -e golangci | xargs -tI % go install ${V:+-v -x} -modfile=tools/go.mod -mod=mod %

generate-mocks: .GOPATH/.ok
	$Q bin/mockgen -source=internal/interface.go -destination=internal/mocks/mocks.go -package=mocks
	$Q bin/mockgen -source=internal/source/source.go -destination=internal/mocks/source.go -package=mocks

build: .GOPATH/.ok
	$Q GOBIN=$(CURDIR)/bin go install $(if $V,-v) $(VERSION_FLAGS) -tags "${GO_BUILD_TAGS}" -buildmode exe $(IMPORT_PATH)

clean:
	$Q GOBIN=$(CURDIR)/bin go clean -i -modcache -x

gitlab-pages: build
	$Q cp -f ./bin/gitlab-pages .