-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
55 lines (43 loc) · 1.14 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
.PHONY: .depend \
all \
clean \
cleanall \
help \
lint \
release \
test \
testall
PROJECT = packer-post-processor-vhd
VERSION = 0.3.0
all: $(PROJECT)
$(PROJECT): .depend clean
go build -v .
help:
@echo "clean remove testing artifacts"
@echo "cleanall remove development and testing artifacts"
@echo "dist cross-compile binaries for distribution"
@echo "help show this page"
@echo "lint check style with golint"
@echo "test run unit tests"
@echo "testall run integration tests"
@echo "release push tags and binaries upstream"
.depend:
go get -d github.com/hashicorp/packer
clean:
go clean -x
$(RM) -r test/output-virtualbox-iso-o*
$(RM) test/*.vhd
cleanall: clean
find test -mindepth 1 ! -path 'test/fixtures*' -exec $(RM) -r {} \;
dist:
gox --osarch="linux/amd64 darwin/amd64 windows/amd64" --output "dist/$(PROJECT)-$(VERSION)-{{ .OS }}_{{ .Arch }}"
lint:
golint ./...
release: dist
git push origin --tags
scripts/release.sh $(PROJECT) $(VERSION)
test:
go test -v ./...
testall:
install $(PROJECT) test/
go test -tags=integration -v ./...