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

Commit d93b72d

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 0968835 commit d93b72d

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
@@ -197,12 +197,13 @@ in
197197
"hub"
198198
"repo-id"
199199
] "kernels-community/${buildToml.general.name}" buildToml;
200-
branch = lib.attrByPath [ "general" "hub" "branch" ] "main" buildToml;
200+
branch = lib.attrByPath [ "general" "hub" "branch" ] null buildToml;
201+
branchOpt = lib.optionalString (branch != null) "--branch ${branch}";
201202
# `kernels upload` fails when there are no build variants to upload.
202203
# However, we do not want this command to error out in that case, so
203204
# only insert the upload command when there is something to upload.
204205
uploadStr = lib.optionalString (applicableBuildSets != [ ]) ''
205-
${pkgs.python3.pkgs.kernels}/bin/kernels upload --repo-id ${repo_id} --branch ${branch} ${bundle}
206+
${pkgs.python3.pkgs.kernels}/bin/kernels upload --repo-id ${repo_id} ${branchOpt} ${bundle}
206207
'';
207208
in
208209
writeScriptBin "build-and-upload" ''

0 commit comments

Comments
 (0)