summaryrefslogtreecommitdiffstats
path: root/scripts/rawhide-snapshot.sh
diff options
context:
space:
mode:
authorLaura Abbott <labbott@fedoraproject.org>2016-10-07 13:59:14 -0700
committerLaura Abbott <labbott@fedoraproject.org>2016-10-10 16:50:38 -0700
commit2f50aa19db3b3de4c7fc03a6299fe54d3aa35552 (patch)
tree65d866eebaf71b8f80094790d1a2bdeeafefb992 /scripts/rawhide-snapshot.sh
parentda8efd59dbeb7d3912641d1543af457d14cdf5e3 (diff)
downloadkernel-2f50aa19db3b3de4c7fc03a6299fe54d3aa35552.tar.gz
kernel-2f50aa19db3b3de4c7fc03a6299fe54d3aa35552.tar.xz
kernel-2f50aa19db3b3de4c7fc03a6299fe54d3aa35552.zip
Add scripts for automatically generating builds
Many of the steps for day-to-day updates still require a lot of manual steps which can lead to typos. Add a series of scripts to make automate the manual steps and hopefully reduce errors. These are a work in progress because having them in tree makes it easier to work out issues.
Diffstat (limited to 'scripts/rawhide-snapshot.sh')
-rwxr-xr-xscripts/rawhide-snapshot.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/rawhide-snapshot.sh b/scripts/rawhide-snapshot.sh
new file mode 100755
index 000000000..ac9bfc771
--- /dev/null
+++ b/scripts/rawhide-snapshot.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# A coffeeproof rawhide script. You should be able to run this before the
+# coffee has kicked in and generate a good rawhide commit.
+#
+# - Updates the local Fedora tree to master and verifies that you are working
+# off of the correct master
+# - Updates the upstream tree to the latest master.
+# - Generates a git snapshot via generate-git-snapshot.sh
+# - Clears out old git snapshots from the sources
+# - Uploads the new snapshot
+
+source scripts/kernel-version.sh
+
+git fetch origin
+if [ "$(git rev-parse origin/master)" != "$(git rev-parse HEAD)" ]; then
+ echo "I just did a git fetch and this branch does not match master"
+ echo "Re-check out this branch to work off of the latest master"
+ exit 1
+fi
+
+if [ ! -d "$LINUX_GIT" ]; then
+ echo "error: set \$LINUX_GIT to point at an upstream git tree"
+ exit 1
+fi
+
+pushd $LINUX_GIT
+git pull
+if [ ! $? -eq 0 ]; then
+ echo "Git pull failed. Is your tree clean/correct?"
+ exit 1
+fi
+popd
+
+GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
+if [ "$GIT" -eq 0 ]; then
+ make debug
+ ./scripts/fixup-bumpspec.sh
+ fedpkg commit -c
+fi
+
+./scripts/generate-git-snapshot.sh
+
+#Nuke the old patch from the source
+awk '!/git/ { print $0 }' < sources > sources.tmp
+mv sources.tmp sources
+
+GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
+fedpkg upload patch-$VER-git$GIT.xz