-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
40 lines (28 loc) · 1.38 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
VERSION = 0.9.6
default: fmt build test
fmt:
go fmt github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...
clean:
rm -rf _bin
# Peform a development (current-platform-only) build.
dev: version fmt
go build -o _bin/docker-machine-driver-ddcloud
install: dev
go install
# Perform a full (all-platforms) build.
build: version build-windows64 build-linux64 build-mac64
build-windows64:
GOOS=windows GOARCH=amd64 go build -o _bin/windows-amd64/docker-machine-driver-ddcloud.exe
build-linux64:
GOOS=linux GOARCH=amd64 go build -o _bin/linux-amd64/docker-machine-driver-ddcloud
build-mac64:
GOOS=darwin GOARCH=amd64 go build -o _bin/darwin-amd64/docker-machine-driver-ddcloud
# Produce archives for a GitHub release.
dist: build
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-windows-amd64.zip _bin/windows-amd64/docker-machine-driver-ddcloud.exe
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-linux-amd64.zip _bin/linux-amd64/docker-machine-driver-ddcloud
zip -9 _bin/docker-machine-driver-ddcloud-v$(VERSION)-darwin-amd64.zip _bin/darwin-amd64/docker-machine-driver-ddcloud
test: fmt
go test -v github.com/DimensionDataResearch/docker-machine-driver-ddcloud/...
version:
echo "package main\n\n// DriverVersion is the current version of the CloudControl driver for Docker Machine.\nconst DriverVersion = \"v${VERSION} (`git rev-parse HEAD`)\"" > ./version-info.go