yocto-autobuilder-helper/scripts/buildhistory-reset
Richard Purdie 3081270545 Add buildhistory-reset and further cleanup
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-15 14:03:33 +00:00

467 B
Executable File

#!/bin/sh

Reset Buildhistory for this branch

Called with $1 - The buildhistory directory

$2 - The remote repository url

$3 - The remote branch name

BUILDHISTDIR=$1 REMOTEREPO=$2 REMOTEBRANCH=$3

echo BH $@

exit 0

Delete Local repo and reset

rm -rf $BUILDHISTDIR

Delete any remote branch too

if git ls-remote --exit-code $REMOTEREPO refs/heads/$REMOTEBRANCH> /dev/null; then git push -q $REMOTEREPO :$REMOTEBRANCH fi