-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (35 loc) · 1.4 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
BUILD_ROOT = .
include CommonVars.inc
################
# Public targets
################
default: fmt build test
fmt:
go fmt $(REPO_ROOT)/...
clean:
rm -rf $(BIN_DIRECTORY) $(VERSION_INFO_FILE)
go clean $(REPO_ROOT)/...
# Perform a development (current-platform-only) build of all plugins and publish them to ~/.packer.d/plugins.
dev: version fmt dev-builders dev-postprocessors
# Perform a development (current-platform-only) build of all plugins of a specific type and publish them to ~/.packer.d/plugins.
dev-%: version fmt
cd $* && make dev
# Perform a full (all-platforms) build of all plugins.
build: version fmt build-builders build-postprocessors
# Perform a full (all-platforms) build of all plugins of a specific type.
build-%: version fmt
cd $* && make build
# Produce archives containing all plugins for a GitHub release.
dist: dist-builders dist-postprocessors
# Produce archives containing all plugins of a specific type for a GitHub release.
dist-%:
cd $* && make dist
# Run most tests.
test: fmt # TODO: Add test targets
# Run all tests.
testall:
go test -v $(REPO_ROOT)/...
version: $(VERSION_INFO_FILE)
$(VERSION_INFO_FILE): Makefile CommonTargets.inc
@echo "Update version info: v$(VERSION)"
@echo "package plugins\n\n// ProviderVersion is the current version of the CloudControl plugins for Packer.\nconst ProviderVersion = \"v$(VERSION) (`git rev-parse HEAD`)\"" > $(VERSION_INFO_FILE)