feat(build): surface workflow output alias in help text
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
a470c4054f
commit
c7e4687dfb
3 changed files with 11 additions and 4 deletions
|
|
@ -32,7 +32,7 @@ func setWorkflowI18n() {
|
|||
|
||||
func initWorkflowFlags() {
|
||||
releaseWorkflowCmd.Flags().StringVar(&releaseWorkflowPath, "path", "", i18n.T("cmd.build.workflow.flag.path"))
|
||||
releaseWorkflowCmd.Flags().StringVar(&releaseWorkflowOutputPath, "output", "", i18n.T("cmd.build.workflow.flag.path"))
|
||||
releaseWorkflowCmd.Flags().StringVar(&releaseWorkflowOutputPath, "output", "", i18n.T("cmd.build.workflow.flag.output"))
|
||||
}
|
||||
|
||||
// AddWorkflowCommand registers the release workflow generation subcommand.
|
||||
|
|
|
|||
|
|
@ -33,8 +33,14 @@ func TestBuildCmd_RunReleaseWorkflow_Good(t *testing.T) {
|
|||
buildCmd := &cli.Command{Use: "build"}
|
||||
AddWorkflowCommand(buildCmd)
|
||||
|
||||
assert.NotNil(t, releaseWorkflowCmd.Flags().Lookup("path"))
|
||||
assert.NotNil(t, releaseWorkflowCmd.Flags().Lookup("output"))
|
||||
pathFlag := releaseWorkflowCmd.Flags().Lookup("path")
|
||||
outputFlag := releaseWorkflowCmd.Flags().Lookup("output")
|
||||
|
||||
assert.NotNil(t, pathFlag)
|
||||
assert.NotNil(t, outputFlag)
|
||||
assert.NotEmpty(t, pathFlag.Usage)
|
||||
assert.NotEmpty(t, outputFlag.Usage)
|
||||
assert.NotEqual(t, pathFlag.Usage, outputFlag.Usage)
|
||||
})
|
||||
|
||||
t.Run("writes to a custom relative path", func(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -115,7 +115,8 @@
|
|||
"short": "Generate the release workflow",
|
||||
"long": "Write the embedded GitHub Actions release workflow into .github/workflows/release.yml or a custom path.",
|
||||
"flag": {
|
||||
"path": "Output path for the workflow file"
|
||||
"path": "Output path for the workflow file",
|
||||
"output": "Alias for --path."
|
||||
}
|
||||
},
|
||||
"sdk": {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue