diff --git a/flake.nix b/flake.nix index 365bf13..de0d6c9 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,9 @@ lib = let builders = pkgs: import ./lib/builders.nix { inherit pkgs; }; - wrap = name: pkgs: args: (builders pkgs).${name} args; + wrap = + name: pkgs: args: + (builders pkgs).${name} args; in { mkParityBuilders = builders; @@ -60,11 +62,13 @@ smoke = pkgs.runCommand "parity-lib-smoke" { } '' : "${ builtins.toString ( - lib.attrNames (builders.mkPyPiWheelPublish { - pname = "demo"; - version = "0.0.0"; - wheel = pkgs.hello; - }) + lib.attrNames ( + builders.mkPyPiWheelPublish { + pname = "demo"; + version = "0.0.0"; + wheel = pkgs.hello; + } + ) ) }" touch $out diff --git a/lib/builders.nix b/lib/builders.nix index 3ba5f29..87ecaf6 100644 --- a/lib/builders.nix +++ b/lib/builders.nix @@ -145,8 +145,10 @@ let }; in { - "stage-${arch}" = mkApp stage "Stage the ${pname} ${arch} wheel into .parity-stage (no registry contact)."; - "publish-${arch}" = mkApp publish "Stage + publish the ${pname} ${arch} wheel (dry-run by default; --publish to push)."; + "stage-${arch}" = + mkApp stage "Stage the ${pname} ${arch} wheel into .parity-stage (no registry contact)."; + "publish-${arch}" = + mkApp publish "Stage + publish the ${pname} ${arch} wheel (dry-run by default; --publish to push)."; "publish" = mkApp publish "Publish all locally-buildable arches (${arch} only for this PyPI repo)."; "push-staged" = pushStaged; }; @@ -226,8 +228,10 @@ let }; in { - "stage-${arch}" = mkApp stage "Stage the ${pname} ${arch} npm addon into .parity-stage (no registry contact)."; - "publish-${arch}" = mkApp publish "Stage + publish the ${pname} ${arch} npm addon (dry-run by default; --publish to push)."; + "stage-${arch}" = + mkApp stage "Stage the ${pname} ${arch} npm addon into .parity-stage (no registry contact)."; + "publish-${arch}" = + mkApp publish "Stage + publish the ${pname} ${arch} npm addon (dry-run by default; --publish to push)."; "publish" = mkApp publish "Publish all locally-buildable arches (${arch} only for this npm repo)."; "push-staged" = mkPushStagedGeneric { inherit @@ -308,9 +312,12 @@ let }; in { - "stage-${arch}" = mkApp stage "Stage the ${pname} ${arch} binary into .parity-stage (no registry contact)."; - "publish-${arch}" = mkApp publish "Stage + publish the ${pname} ${arch} binary (dry-run by default; --publish to push)."; - "publish" = mkApp publish "Publish all locally-buildable arches (${arch} only for this generic-binary repo)."; + "stage-${arch}" = + mkApp stage "Stage the ${pname} ${arch} binary into .parity-stage (no registry contact)."; + "publish-${arch}" = + mkApp publish "Stage + publish the ${pname} ${arch} binary (dry-run by default; --publish to push)."; + "publish" = + mkApp publish "Publish all locally-buildable arches (${arch} only for this generic-binary repo)."; "push-staged" = mkPushStagedGeneric { inherit pname @@ -400,8 +407,10 @@ let }; in { - "stage-chart" = mkApp stage "Package the ${pname} helm chart into .parity-stage (no registry contact)."; - "publish-chart" = mkApp publish "Package + publish the ${pname} helm chart (dry-run by default; --publish to push)."; + "stage-chart" = + mkApp stage "Package the ${pname} helm chart into .parity-stage (no registry contact)."; + "publish-chart" = + mkApp publish "Package + publish the ${pname} helm chart (dry-run by default; --publish to push)."; "publish" = mkApp publish "Publish the ${pname} helm chart."; "push-staged" = mkPushStagedHelm { inherit @@ -551,7 +560,9 @@ let VERSION="$(parity_derive_version ${lib.escapeShellArg version})" fwd=() [ "$PARITY_PUBLISH" = "1" ] && fwd=(--publish) - ${lib.concatMapStringsSep "\n" (a: " ${lib.getExe (mkArchPublish a)} \"\${fwd[@]}\"") localArches} + ${lib.concatMapStringsSep "\n" ( + a: " ${lib.getExe (mkArchPublish a)} \"\${fwd[@]}\"" + ) localArches} ${lib.getExe indexApp} "''${fwd[@]}" if [ "$PARITY_PUBLISH" != "1" ]; then echo "[dry-run] would copy ${imageName}:$VERSION -> ${imageName}:latest (digest copy, LAST mutation)" @@ -596,9 +607,12 @@ let archStageApps // archPublishApps // { - "publish-index" = mkApp indexApp "Assemble the multi-arch index ${imageName}: from pushed per-arch tags (fail-closed)."; - "publish" = mkApp publishAll "Publish all local arches + index; :latest = digest copy of :TAG (last mutation)."; - "push-staged" = mkApp pushStaged "Replay staged ${imageName} arch closures from .parity-stage to the registry."; + "publish-index" = + mkApp indexApp "Assemble the multi-arch index ${imageName}: from pushed per-arch tags (fail-closed)."; + "publish" = + mkApp publishAll "Publish all local arches + index; :latest = digest copy of :TAG (last mutation)."; + "push-staged" = + mkApp pushStaged "Replay staged ${imageName} arch closures from .parity-stage to the registry."; }; # =========================================================================