Skip to content

Commit

Permalink
cmd/release: fix CRD schema table for pre releases
Browse files Browse the repository at this point in the history
Signed-off-by: André Martins <[email protected]>
  • Loading branch information
aanm committed Sep 4, 2024
1 parent d6508f7 commit b5e1369
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/release/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ func (pc *PrepareCommit) Run(ctx context.Context, _, _ bool, ghClient *GHClient)
// If we are doing a pre-release from the main branch then the remote
// branch doesn't exist.
branch := pc.cfg.RemoteBranchName
crdBranch := semver.MajorMinor(pc.cfg.TargetVer)
if !pc.cfg.HasStableBranch() {
branch = pc.cfg.DefaultBranch
crdBranch = semver.MajorMinor(pc.cfg.PreviousVer)
}

localBranch := fmt.Sprintf("pr/prepare-%s", pc.cfg.TargetVer)
Expand Down Expand Up @@ -128,7 +130,6 @@ func (pc *PrepareCommit) Run(ctx context.Context, _, _ bool, ghClient *GHClient)
// $DIR/../../Documentation/check-crd-compat-table.sh "$target_branch" --update
//
io2.Fprintf(2, os.Stdout, "Updating check-crd-compat-table.sh\n")
crdBranch := semver.MajorMinor(pc.cfg.TargetVer)
_, err = execCommand(pc.cfg.RepoDirectory, "Documentation/check-crd-compat-table.sh", crdBranch, "--update")
if err != nil {
return err
Expand Down

0 comments on commit b5e1369

Please sign in to comment.