Skip to content

Commit

Permalink
Make branch ordering deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Jan 16, 2025
1 parent 872b34b commit 8b54bf5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 44 deletions.
72 changes: 36 additions & 36 deletions .github/workflows/go-module-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,116 +22,116 @@ jobs:
include:
- repo: backstage-plugins
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: backstage-plugins
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: backstage-plugins
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: backstage-plugins
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: client
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: client
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-hyperfoil-benchmark
branch: main
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-istio
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-istio
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-istio
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-istio
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-kafka-broker
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-kafka-broker
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-kafka-broker
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing-kafka-broker
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: eventing
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: kn-plugin-event
branch: release-1.15
- repo: kn-plugin-event
branch: release-1.16
- repo: kn-plugin-func
branch: serverless-1.34
- repo: kn-plugin-func
branch: release-v1.15
- repo: kn-plugin-func
branch: release-v1.16
- repo: kn-plugin-func
branch: serverless-1.34
- repo: serverless-operator
branch: main
postUpdateCmd: make generate-release
postUpdateCmd: make generated-files
- repo: serverless-operator
branch: release-1.35
postUpdateCmd: make generate-release
postUpdateCmd: make generated-files
- repo: serverless-operator
branch: release-1.36
postUpdateCmd: make generate-release
postUpdateCmd: make generated-files
- repo: net-istio
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-istio
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-istio
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-istio
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-kourier
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-kourier
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-kourier
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: net-kourier
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: serving
branch: release-v1.12
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: serving
branch: release-v1.14
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: serving
branch: release-v1.15
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
- repo: serving
branch: release-v1.16
postUpdateCmd: make generated-files
postUpdateCmd: make generate-release
steps:
- name: Configure Git user
run: |
Expand Down
11 changes: 3 additions & 8 deletions pkg/action/go_mod_bump_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ func GoModuleBumpAction(ctx context.Context, cfg Config) error {
}

for _, repo := range inConfig.Repositories {
for branchName := range inConfig.Config.Branches {
sortedBranches := sortedKeys(inConfig.Config.Branches)
for _, branchName := range sortedBranches {

if branchName == "release-next" {
continue
Expand All @@ -59,13 +60,7 @@ func GoModuleBumpAction(ctx context.Context, cfg Config) error {
repoConfig := BumpRepoConfig{
Repo: repo.Repo,
Branch: branchName,
PostUpdateCmd: "make generated-files",
}

if repo.IsServerlessOperator() {
repoConfig.PostUpdateCmd = "make generate-release"
} else if repo.IsFunc() || repo.IsEventPlugin() {
repoConfig.PostUpdateCmd = ""
PostUpdateCmd: repo.RunCodegenCommand(),
}

repoConfigs = append(repoConfigs, repoConfig)
Expand Down

0 comments on commit 8b54bf5

Please sign in to comment.