Skip to content

Commit

Permalink
Makefile: replace enumer upstream with dmarkham's (#13107)
Browse files Browse the repository at this point in the history
Since the enumer implementation we used hadn't been updated for 5+
years, this didn't work with recent linux/go versions, and enumer
crashed while attempting to parse/analyse the source files.

There's another alternative on Github, forked from the one we used,
which seems more maintained now, and does produce the expected files in
Packer.
  • Loading branch information
lbajolet-hashicorp authored Jul 17, 2024
1 parent ae367bc commit 4a7f5f3
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ install-build-deps: ## Install dependencies for bin build
@go install github.com/mitchellh/[email protected]

install-gen-deps: ## Install dependencies for code generation
@GO111MODULE=on go install github.com/alvaroloes/enumer@master
@GO111MODULE=on go install github.com/dmarkham/enumer@master
@go install github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest

install-lint-deps: ## Install linter dependencies
Expand Down
35 changes: 32 additions & 3 deletions command/configtype_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 36 additions & 4 deletions packer/fixconfigmode_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 56 additions & 9 deletions provisioner/powershell/executionpolicy_enumer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a7f5f3

Please sign in to comment.