-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
36 lines (28 loc) · 1.01 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
# Needs to be defined before including Makefile.common to auto-generate targets
DOCKER_ARCHS ?= amd64 arm64
DOCKER_REPO ?= ohiosupercomputer
export GOPATH ?= $(firstword $(subst :, ,$(shell go env GOPATH)))
GOLANG_CROSS_VERSION ?= v1.23.3
include Makefile.common
DOCKER_IMAGE_NAME ?= ondemand_exporter
coverage:
go test -race -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic ./...
release-test:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/work -w /work \
ghcr.io/goreleaser/goreleaser-cross:$(GOLANG_CROSS_VERSION) \
build --snapshot --clean
release:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
--env-file .release-env -v `pwd`:/work -w /work \
ghcr.io/goreleaser/goreleaser-cross:$(GOLANG_CROSS_VERSION) \
release --clean
%/.unpacked: %.ttar
@echo ">> extracting fixtures"
./ttar -C $(dir $*) -x -f $*.ttar
touch $@
update_fixtures:
rm -vf fixtures/.unpacked
./ttar -c -f fixtures.ttar fixtures/
.PHONY: test
test: fixtures/.unpacked common-test