This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
64 lines (49 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
58
59
60
61
62
63
64
test :: checks unit_test test_integration
unit_test :: build
docker run --rm -v `pwd`:/go/src/github.com/SUSE/zypper-docker zypper-docker /opt/test.sh
test_integration :: build_zypper_docker
test/test-integration.sh
local_test_integration :: build_zypper_docker build_integration_tests
test/test-integration.sh
checks :: vet fmt lint gotest climate
vet ::
@echo "+ $@"
@go vet .
fmt ::
@echo "+ $@"
@test -z "$$(gofmt -l . | grep -v vendor | tee /dev/stderr)" || \
echo "+ please format Go code with 'gofmt'"
lint ::
@echo "+ $@"
@test -z "$$(golint . | grep -v vendor | tee /dev/stderr)"
climate:
@echo "+ $@"
@(./scripts/climate -o -p -a .)
# TODO: use '-race' once it works in openSUSE's golang
gotest:
@echo "+ $@"
@go test -v
clean ::
docker rmi zypper-docker
docker rmi zypper-docker-integration-tests
rm -f zypper-docker
rm -f man/man1
man ::
@ cd man && go run generate.go
build ::
@echo Building zypper-docker
docker build -f docker/Dockerfile -t zypper-docker docker
build_zypper_docker ::
go build
build_integration_tests ::
@echo Building zypper-docker-integration-tests
docker build -f docker/Dockerfile-integration-tests -t zypper-docker-integration-tests $(CURDIR)
docker pull alpine:latest
help ::
@echo usage: make [target]
@echo
@echo build: Creates the dockerimage.
@echo clean: Remove the dockerimage.
@echo test: Testing zypper-docker.
@echo test_integration: Integration Tests
@echo man: Generate man pages of zypper-docker