File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1- NAME =gridscale
1+ NAME =scaffolding
22BINARY =packer-plugin-${NAME}
33
44COUNT? =1
55TEST? =$(shell go list ./...)
66HASHICORP_PACKER_PLUGIN_SDK_VERSION? =$(shell go list -m github.com/hashicorp/packer-plugin-sdk | cut -d " " -f2)
7+ PLUGIN_FQN =$(shell grep -E '^module' <go.mod | sed -E 's/module \s* //')
78
89.PHONY : dev
910
1011build :
1112 @go build -o ${BINARY}
1213
13- dev : build
14- @mkdir -p ~ /.packer.d/plugins/
15- @mv ${BINARY} ~ /. packer.d/plugins/ ${BINARY}
14+ dev :
15+ go build -ldflags= " -X ' ${PLUGIN_FQN} /version.VersionPrerelease=dev' " -o ${BINARY}
16+ packer plugins install --path ${BINARY} " $( shell echo " ${PLUGIN_FQN} " | sed ' s/ packer-plugin-// ' ) "
1617
1718test :
1819 @go test -race -count $(COUNT ) $(TEST ) -timeout=3m
@@ -28,7 +29,7 @@ testacc: dev
2829
2930generate : install-packer-sdc
3031 @go generate ./...
31- @if [ -d " .docs " ] ; then rm -r " .docs" ; fi
32- @packer-sdc renderdocs -src " docs" -partials docs-partials/ -dst " .docs/"
33- @./.web-docs/scripts/compile-to-webdocs.sh " ." " .docs" " .web-docs" " gridscale "
34- @rm -r " .docs"
32+ @rm -rf .docs
33+ @packer-sdc renderdocs -src docs -partials docs-partials/ -dst .docs/
34+ @./.web-docs/scripts/compile-to-webdocs.sh " ." " .docs" " .web-docs" " hashicorp "
35+ @rm -r " .docs"
You can’t perform that action at this time.
0 commit comments