Skip to content

Commit

Permalink
Merge pull request #3272 from saschagrunert/template-dir
Browse files Browse the repository at this point in the history
Make `--template-dir` work for `krel obs release`
  • Loading branch information
k8s-ci-robot authored Sep 14, 2023
2 parents 2633f4f + 6075591 commit aaaaaf3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmd/krel/cmd/obs_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ func init() {
"List of packages to build",
)

obsReleaseCmd.PersistentFlags().
StringVar(
&obsReleaseOptions.SpecTemplatePath,
obsSpecTemplatePathFlag,
obsReleaseOptions.SpecTemplatePath,
"Path to a directory containing templates for specs",
)

obsReleaseCmd.PersistentFlags().
StringVar(
&obsReleaseOptions.Project,
Expand Down
2 changes: 1 addition & 1 deletion pkg/obs/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (d *DefaultRelease) InitOBSRoot() error {
return fmt.Errorf("creating obs config file: %w", err)
}

return d.impl.MkdirAll(obsRoot)
return d.impl.MkdirAll(filepath.Join(d.options.Workspace, obsRoot))
}

// ValidateOptions validates the release options.
Expand Down

0 comments on commit aaaaaf3

Please sign in to comment.