summaryrefslogtreecommitdiff
path: root/util/release
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2016-01-29 23:02:56 +0100
committerPatrick Georgi <pgeorgi@google.com>2016-02-01 08:58:37 +0100
commit68e3f6dd371ced6963802295e1e176dca5729d2f (patch)
tree2045543e4cab544ed62707b25c677d326f276c6f /util/release
parenta851bbb40a36d4722b51c8232d2307bf0b2e9c5d (diff)
downloadcoreboot-68e3f6dd371ced6963802295e1e176dca5729d2f.tar.xz
util/release: extend release script
Add the ability to release a given commit id, and normalize the tarballs to use coreboot/1000 for owner and group, and the last commit date as mtime for all files. Change-Id: Ia349f429090fe9804f7f14c226812646e2f712be Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13514 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/release')
-rwxr-xr-xutil/release/build-release11
1 files changed, 8 insertions, 3 deletions
diff --git a/util/release/build-release b/util/release/build-release
index ae00dbfd71..f09f5b284a 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -1,16 +1,21 @@
#!/bin/bash
# $1: new version name
+# $2: commit id (if not master)
set -e
if [ -z "$1" ]; then
- echo "usage: $0 version"
+ echo "usage: $0 version [commit id]"
echo "tags a new coreboot version and creates a tar archive"
exit 1
fi
git clone --recurse-submodules http://review.coreboot.org/coreboot.git coreboot-$1
cd coreboot-$1
+if [ -n "$2" ]; then
+ git reset --hard $2
+fi
git submodule update --init --checkout
git tag -a --force $1 -m "coreboot version $1"
printf "$1-$(git log --pretty=%H|head -1)\n" > .coreboot-version
+tstamp=$(git log --pretty=format:%ci -1)
cd ..
-tar --exclude-vcs --exclude=coreboot-${1}/3rdparty/blobs -cvf - coreboot-${1} |xz -9 > coreboot-${1}.tar.xz
-tar --exclude-vcs -cvf - coreboot-${1}/3rdparty/blobs |xz -9 > coreboot-blobs-${1}.tar.xz
+tar --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs --exclude=coreboot-${1}/3rdparty/blobs -cvf - coreboot-${1} |xz -9 > coreboot-${1}.tar.xz
+tar --mtime="$tstamp" --owner=coreboot:1000 --group=coreboot:1000 --exclude-vcs -cvf - coreboot-${1}/3rdparty/blobs |xz -9 > coreboot-blobs-${1}.tar.xz