Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore prerelease plugins help text #12882

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
└── packer-plugin-happycloud_v0.0.1_x5.0_darwin_arm64_SHA256SUM
```

### FEATURES:
* core: Add `-ignore-prerelease-plugins` flag to disable the use of development
plugin binaries for the `build` and `validate` commands development plugin
binaries. [GH-12828](https://github.com/hashicorp/packer/pull/12828)

### IMPROVEMENTS:
* core: Move to predictable plugin loading schema - Packer will now only load
plugins stored under PACKER_PLUGIN_PATH using the expected namespaced
Expand Down
1 change: 1 addition & 0 deletions command/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ Options:
-var 'key=value' Variable for templates, can be used multiple times.
-var-file=path JSON or HCL2 file containing user variables, can be used multiple times.
-warn-on-undeclared-var Display warnings for user variable files containing undeclared variables.
-ignore-prerelease-plugins Disable the loading of prerelease plugin binaries (x.y.z-dev).
`

return strings.TrimSpace(helpText)
Expand Down
4 changes: 2 additions & 2 deletions command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (ba *BuildArgs) AddFlagSets(flags *flag.FlagSet) {

flags.BoolVar(&ba.MetaArgs.WarnOnUndeclaredVar, "warn-on-undeclared-var", false, "Show warnings for variable files containing undeclared variables.")

flags.BoolVar(&ba.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-<prerelease-name>.")
lbajolet-hashicorp marked this conversation as resolved.
Show resolved Hide resolved
flags.BoolVar(&ba.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-dev).")

ba.MetaArgs.AddFlagSets(flags)
}
Expand Down Expand Up @@ -146,7 +146,7 @@ func (va *ValidateArgs) AddFlagSets(flags *flag.FlagSet) {
flags.BoolVar(&va.SyntaxOnly, "syntax-only", false, "check syntax only")
flags.BoolVar(&va.NoWarnUndeclaredVar, "no-warn-undeclared-var", false, "Ignore warnings for variable files containing undeclared variables.")
flags.BoolVar(&va.EvaluateDatasources, "evaluate-datasources", false, "evaluate datasources for validation (HCL2 only, may incur costs)")
flags.BoolVar(&va.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-<prerelease-name>.")
flags.BoolVar(&va.ReleaseOnly, "ignore-prerelease-plugins", false, "Disable the loading of prerelease plugin binaries (x.y.z-dev).")

va.MetaArgs.AddFlagSets(flags)
}
Expand Down
1 change: 1 addition & 0 deletions command/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Options:
-var-file=path JSON or HCL2 file containing user variables, can be used multiple times.
-no-warn-undeclared-var Disable warnings for user variable files containing undeclared variables.
-evaluate-datasources Evaluate data sources during validation (HCL2 only, may incur costs); Defaults to false.
-ignore-prerelease-plugins Disable the loading of prerelease plugin binaries (x.y.z-dev).
`

return strings.TrimSpace(helpText)
Expand Down
Loading