Skip to content

Instantly share code, notes, and snippets.

@ivan
Last active December 15, 2022 08:53
Show Gist options
  • Save ivan/5f01fdfef1cbcb76e2f80b4267de6892 to your computer and use it in GitHub Desktop.
Save ivan/5f01fdfef1cbcb76e2f80b4267de6892 to your computer and use it in GitHub Desktop.
git cherry-pick version bumps from nixpkgs master onto your nixpkgs release branch
#!/usr/bin/env bash
# This is intended to be run in a git checkout of nixpkgs
set -eu -o pipefail
dirs=(
./pkgs/development/tools/esbuild
./pkgs/applications/misc/calibre
)
for dir in ${dirs[@]}; do
echo $dir
for commit in $(git log --oneline origin/master -- "$dir" | rg -F ' (->|→) ' | head -n 10 | tac | cut -d ' ' -f 1); do
echo "$commit"
git cherry-pick -x "$commit" || git cherry-pick --abort
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment