-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
34 lines (26 loc) · 1.17 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
default: build
prepare:
go get ./...
test: prepare
go test ./...
fmt:
go fmt .
build: fmt test
go build -v
install: build
mkdir -p ~/.packer.d/plugins
install ./packer-provisioner-serverspec ~/.packer.d/plugins/
release: test
mkdir -p releases
go get github.com/mitchellh/gox
gox -osarch="darwin/amd64 darwin/386 linux/amd64 linux/386 windows/amd64 windows/386" --output 'dist/{{.OS}}_{{.Arch}}/{{.Dir}}'
zip -j releases/packer-provisioner-serverspec_darwin_386.zip dist/darwin_386/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_darwin_amd64.zip dist/darwin_amd64/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_linux_386.zip dist/linux_386/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_linux_amd64.zip dist/linux_amd64/packer-provisioner-serverspec
zip -j releases/packer-provisioner-serverspec_windows_386.zip dist/windows_386/packer-provisioner-serverspec.exe
zip -j releases/packer-provisioner-serverspec_windows_amd64.zip dist/windows_amd64/packer-provisioner-serverspec.exe
clean:
rm -rf dist/
rm -f releases/*.zip
.PHONY: default prepare test build install release clean