generate execution policy from makefile

* make generate now generates on `./...` instead of `.`
This commit is contained in:
Adrien Delorme 2019-05-27 14:52:04 +02:00
parent 5a8323686f
commit abd6eda6c9
3 changed files with 5 additions and 2 deletions

View File

@ -50,6 +50,7 @@ deps:
@go get golang.org/x/tools/cmd/goimports @go get golang.org/x/tools/cmd/goimports
@go get golang.org/x/tools/cmd/stringer @go get golang.org/x/tools/cmd/stringer
@go get -u github.com/mna/pigeon @go get -u github.com/mna/pigeon
@go get github.com/alvaroloes/enumer
dev: deps ## Build and install a development build dev: deps ## Build and install a development build
@grep 'const VersionPrerelease = ""' version/version.go > /dev/null ; if [ $$? -eq 0 ]; then \ @grep 'const VersionPrerelease = ""' version/version.go > /dev/null ; if [ $$? -eq 0 ]; then \
@ -95,7 +96,7 @@ fmt-examples:
# generate runs `go generate` to build the dynamically generated # generate runs `go generate` to build the dynamically generated
# source files. # source files.
generate: deps ## Generate dynamically generated code generate: deps ## Generate dynamically generated code
go generate . go generate ./...
gofmt -w common/bootcommand/boot_command.go gofmt -w common/bootcommand/boot_command.go
goimports -w common/bootcommand/boot_command.go goimports -w common/bootcommand/boot_command.go
gofmt -w command/plugin.go gofmt -w command/plugin.go

View File

@ -1,3 +1,5 @@
//go:generate enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy
package powershell package powershell
import ( import (

View File

@ -1,4 +1,4 @@
// Code generated by "enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy provisioner/powershell/execution_policy.go"; DO NOT EDIT. // Code generated by "enumer -transform snake -trimprefix ExecutionPolicy -type ExecutionPolicy"; DO NOT EDIT.
// //
package powershell package powershell