mirror of
https://github.com/urbit/shrub.git
synced 2024-11-23 20:26:54 +03:00
sh/merge-with-custom-msg: add checks [ci skip]
* Use 'set -e' to bail on any errors. * If the pull request number is not specified, bail out. * Print a simple pre-merge checklist before prompting for merge.
This commit is contained in:
parent
36e770f722
commit
6acb751560
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
local error="$1"
|
local error="$1"
|
||||||
|
|
||||||
@ -41,12 +43,29 @@ fi
|
|||||||
REV=$1
|
REV=$1
|
||||||
PR=$2
|
PR=$2
|
||||||
|
|
||||||
|
if [[ -z "$PR" ]]; then
|
||||||
|
usage "PULL_REQUEST not specified"
|
||||||
|
fi
|
||||||
|
|
||||||
KERNEL_CHANGED=`git diff --name-status $REV -- pkg/arvo/sys`
|
KERNEL_CHANGED=`git diff --name-status $REV -- pkg/arvo/sys`
|
||||||
PILLS_CHANGED=`git diff --name-status $REV -- bin`
|
PILLS_CHANGED=`git diff --name-status $REV -- bin`
|
||||||
|
|
||||||
|
echo "Pre-merge checklist:"
|
||||||
|
echo
|
||||||
|
echo "Arvo:"
|
||||||
|
echo "* Is this contribution OTA-updateable on top of the latest release?"
|
||||||
|
echo "* Does this contribution include updated pills, if applicable?"
|
||||||
|
echo
|
||||||
|
echo "General:"
|
||||||
|
echo "* Does this contribution contain tests for sanity checks, regressions, etc.?"
|
||||||
|
echo "* Are commit prefixes present and accurate?"
|
||||||
|
echo "* Have all WIP/FIXME/DONTCOMMIT commits been squashed?"
|
||||||
|
echo "* Do commits contain long-form descriptions, if applicable?"
|
||||||
|
echo
|
||||||
|
|
||||||
if [[ ! -z $KERNEL_CHANGED && -z $PILLS_CHANGED ]]
|
if [[ ! -z $KERNEL_CHANGED && -z $PILLS_CHANGED ]]
|
||||||
then
|
then
|
||||||
echo "WARNING: kernel has changed, but pills have not"
|
echo "**WARNING**: kernel has changed, but pills have not"
|
||||||
echo $KERNEL_CHANGED
|
echo $KERNEL_CHANGED
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user