From 6fe1146d1e83a3e3f95ef23993f975ddd19d03e0 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 27 Mar 2025 01:26:11 +0100 Subject: [PATCH] kjldsaljkdsalkj --- justfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index 7474578..2503742 100644 --- a/justfile +++ b/justfile @@ -50,10 +50,11 @@ list-packages +$cut_args="-c1-": _packages_json | grep -v $'\t'pkgs/tools/package-management/akku/default.nix \ | grep -v $'\t'pkgs/tools/typesetting/tex/texlive/build-texlive-package.nix +[no-cd] @list-ripgrepped-packages +$ripgrep_args: [[ -e .git && -e flake.nix ]] || { echo >&2 "ERROR; Not in repo root"; false; } [[ -n "$ripgrep_args" ]] || { echo >&2 "ERROR; No ripgrep args"; false; } - cd "$invokedir"; rg "$@" pkgs/ -tnix -l | just _list_packages_fname_filtered + rg "$@" pkgs/ -tnix -l | just _list_packages_fname_filtered @list-dirty-packages: test -n "$($GIT diff HEAD --name-only)" || { echo >&2 "No unstaged dirty files found!"; false; } @@ -149,7 +150,7 @@ _build_packages $outdir +$attrpaths: export NOTFOUNDDIR="$(mktemp -d)"; touch "$NOTFOUNDDIR"/no-eval shift just instantiate-packages "$@" | tee >(command cat >&2) \ - | eval xargs nom-build --keep-going --no-out-link ${_JUST_NIX_BUILD_ARGS:-} + | eval xargs nom-build --keep-going --no-out-link ${_JUST_NIX_BUILD_ARGS:-} ||: worker() { set -x local attrpath="$1" @@ -258,7 +259,7 @@ commit-dirty-packages +$message=`gum input --placeholder="commit message, (attrp done [no-cd] -@fixup-commit: +fixup-commit: #!/usr/bin/env -S bash -euo pipefail # TODO: list commits first test -n "$($GIT diff --name-only --staged)" || { @@ -273,6 +274,7 @@ commit-dirty-packages +$message=`gum input --placeholder="commit message, (attrp } just fixup-commit-staged +[no-cd] fixup-commit-staged commit=`cd "$invokedir"; just _a_commit`: #!/usr/bin/env -S bash -euo pipefail test -n "{{ commit }}" # just exit if no selection was made @@ -420,7 +422,7 @@ remote-branch $remote_ref=`just _a_remote_branch origin | cut -d/ -f2-`: gum choose feat fix init bump doc migrate @_a_wt_name: gum input --placeholder="Branch name?" -_new_worktree $type=`just _a_wt_type` $name=`just a_wt_name` $base=`just _a_upstream_release_branch "Base?"` $onto=`just _a_upstream_release_branch "Onto?" ""`: +_new_worktree $type=`just _a_wt_type` $name=`just _a_wt_name` $base=`just _a_upstream_release_branch "Base?"` $onto=`just _a_upstream_release_branch "Onto?" ""`: #!/usr/bin/env -S bash -euo pipefail [[ -n "$type" ]] [[ -n "$name" ]] @@ -483,7 +485,7 @@ pop-commits-to-new-worktree $commits=`cd "$invokedir"; just _some_commits`: $GIT rebase --onto upstream/"$onto"...HEAD upstream/master --autostash [no-cd] -@rebase-onto $base=`just _a_upstream_release_branch "Base?" HEAD` $onto=`just _a_upstream_release_branch "Onto?"`: +rebase-onto $base=`just _a_upstream_release_branch "Base?" HEAD` $onto=`just _a_upstream_release_branch "Onto?"`: #!/usr/bin/env -S bash -euo pipefail if [[ "$base" != HEAD ]] ; then remote="$(cut -d/ -f1 <<<"$base")"