summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaura Abbott <labbott@fedoraproject.org>2016-10-17 11:53:27 -0700
committerLaura Abbott <labbott@fedoraproject.org>2016-10-17 11:55:45 -0700
commit1fdea39f75096d3deccd1c9e900e1830dbdef512 (patch)
tree369bbf6ba0b49c796fb6ecaac053879b593bbc35
parent1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee (diff)
downloadkernel-1fdea39f75096d3deccd1c9e900e1830dbdef512.tar.gz
kernel-1fdea39f75096d3deccd1c9e900e1830dbdef512.tar.xz
kernel-1fdea39f75096d3deccd1c9e900e1830dbdef512.zip
Rawhide snapshot updates
- Check for trying to snapshot a git tag - Check for nothing to do case - Switch to using git -C in one place instead of a pushd
-rwxr-xr-xscripts/rawhide-snapshot.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/rawhide-snapshot.sh b/scripts/rawhide-snapshot.sh
index ac9bfc771..b96bd38d9 100755
--- a/scripts/rawhide-snapshot.sh
+++ b/scripts/rawhide-snapshot.sh
@@ -23,13 +23,24 @@ if [ ! -d "$LINUX_GIT" ]; then
exit 1
fi
-pushd $LINUX_GIT
-git pull
+git -C $LINUX_GIT pull
if [ ! $? -eq 0 ]; then
echo "Git pull failed. Is your tree clean/correct?"
exit 1
fi
-popd
+
+git -C $LINUX_GIT describe --tags HEAD | grep -q "\-g"
+if [ ! $? -eq 0 ]; then
+ echo "Trying to snapshot off of a tagged git."
+ echo "I don't think this is what you want"
+ exit 1
+fi
+
+if [ "$(git -C $LINUX_GIT rev-parse origin/master)" == `cat gitrev` ]; then
+ echo "Last snapshot commit matches current master. Nothing to do"
+ echo "\o/"
+ exit 0
+fi
GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
if [ "$GIT" -eq 0 ]; then