diff options
author | Laura Abbott <labbott@fedoraproject.org> | 2016-10-17 11:53:27 -0700 |
---|---|---|
committer | Laura Abbott <labbott@fedoraproject.org> | 2016-10-17 11:55:45 -0700 |
commit | 1fdea39f75096d3deccd1c9e900e1830dbdef512 (patch) | |
tree | 369bbf6ba0b49c796fb6ecaac053879b593bbc35 /scripts | |
parent | 1b957b6a4fb5a6bce3322a359d7cda0bbf3dfcee (diff) | |
download | kernel-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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/rawhide-snapshot.sh | 17 |
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 |