forked from jetbrains-infra/packer-builder-vsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (24 loc) · 934 Bytes
/
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
GOOPTS := GOARCH=amd64 CGO_ENABLED=0
build: iso clone
iso: iso-linux iso-windows iso-macos
clone: clone-linux clone-windows clone-macos
iso-linux: modules bin
$(GOOPTS) GOOS=linux go build -o bin/packer-builder-vsphere-iso.linux ./cmd/iso
iso-windows: modules bin
$(GOOPTS) GOOS=windows go build -o bin/packer-builder-vsphere-iso.exe ./cmd/iso
iso-macos: modules bin
$(GOOPTS) GOOS=darwin go build -o bin/packer-builder-vsphere-iso.macos ./cmd/iso
clone-linux: modules bin
$(GOOPTS) GOOS=linux go build -o bin/packer-builder-vsphere-clone.linux ./cmd/clone
clone-windows: modules bin
$(GOOPTS) GOOS=windows go build -o bin/packer-builder-vsphere-clone.exe ./cmd/clone
clone-macos: modules bin
$(GOOPTS) GOOS=darwin go build -o bin/packer-builder-vsphere-clone.macos ./cmd/clone
modules:
go mod download
bin:
mkdir -p bin
rm -f bin/*
test:
PACKER_ACC=1 go test -v -count 1 ./driver ./iso ./clone
.PHONY: bin test