Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 80406d4

Browse files
committed
build-and-upload: only add branch option when specified
This allows version-based uploading to kick in when no branch is specified.
1 parent 4f0b96a commit 80406d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/gen-flake-outputs.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,13 @@ in
187187
"hub"
188188
"repo-id"
189189
] "kernels-community/${buildToml.general.name}" buildToml;
190-
branch = lib.attrByPath [ "general" "hub" "branch" ] "main" buildToml;
190+
branch = lib.attrByPath [ "general" "hub" "branch" ] null buildToml;
191+
branchOpt = lib.optionalString (branch != null) "--branch ${branch}";
191192
in
192193
writeScriptBin "build-and-upload" ''
193194
#!/usr/bin/env bash
194195
set -euo pipefail
195-
${bestBuildSet.pkgs.python3.pkgs.kernels}/bin/kernels upload --repo-id ${repo_id} --branch ${branch} ${bundle}
196+
${bestBuildSet.pkgs.python3.pkgs.kernels}/bin/kernels upload --repo-id ${repo_id} ${branchOpt} ${bundle}
196197
'';
197198

198199
ci =

0 commit comments

Comments
 (0)