mirror of
https://github.com/urbit/shrub.git
synced 2024-11-23 20:26:54 +03:00
sh/merge-with-custom-msg: add pill update check [ci skip]
It's very easy to forget to verify that pills have been updated accordingly when the kernel changes. This adds a warning that prints when the kernel in the target has changed but the pills have not. Also prompts the user for confirmation pre-merge.
This commit is contained in:
parent
f848d60b68
commit
7be9ed95ab
@ -45,5 +45,18 @@ TARGET=$(echo $REV | sed s_origin/__)
|
||||
|
||||
MERGE_MSG="Merge branch '$TARGET' (#$PR)"
|
||||
|
||||
git merge --no-ff --signoff --log -m "$MERGE_MSG" $REV
|
||||
KERNEL_CHANGED=`git diff --name-status $TARGET -- pkg/arvo/sys`
|
||||
PILLS_CHANGED=`git diff --name-status $TARGET -- bin`
|
||||
|
||||
[[ ! -z $KERNEL_CHANGED && -z $PILLS_CHANGED ]] && \
|
||||
echo "WARNING: kernel has changed, but pills have not"
|
||||
echo $KERNEL_CHANGED
|
||||
echo
|
||||
|
||||
read -p "Proceed with merge? (y/n)" -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
git merge --no-ff --signoff --log -m "$MERGE_MSG" $REV
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user