librenms/scripts/github-apply
Tony Murray ad41a18f5c
GitHub test script updates (#9507)
* GitHub test script updates
add --reject to apply so it will skip binary files since GitHub does not create diffs for them correctly
Add new directories to the removal cleanup. Remove non-existant ones.

* Cleaner way to apply skip png files explicitly.
That way patches are still atomic.
2018-12-05 10:48:56 -06:00

10 lines
298 B
Bash
Executable File

#!/bin/sh
LIBRENMS_DIR=`dirname "$(readlink -f "$0/..")"`
cd $LIBRENMS_DIR
case $1 in
''|*[!0-9]*) echo "You must specify a PR number to apply a patch" ;;
*) curl -s https://patch-diff.githubusercontent.com/raw/librenms/librenms/pull/${1}.diff | git apply --exclude=*.png -v ${2} ;;
esac