2015-07-13 22:48:46 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# $1: new version name
|
2016-01-29 23:02:56 +01:00
|
|
|
# $2: commit id (if not master)
|
2015-07-13 22:48:46 +02:00
|
|
|
set -e
|
|
|
|
if [ -z "$1" ]; then
|
2016-01-29 23:02:56 +01:00
|
|
|
echo "usage: $0 version [commit id]"
|
2015-07-13 22:48:46 +02:00
|
|
|
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
|
2016-01-29 23:02:56 +01:00
|
|
|
if [ -n "$2" ]; then
|
|
|
|
git reset --hard $2
|
|
|
|
fi
|
2015-07-13 22:48:46 +02:00
|
|
|
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
|
2016-01-29 23:02:56 +01:00
|
|
|
tstamp=$(git log --pretty=format:%ci -1)
|
2015-07-13 22:48:46 +02:00
|
|
|
cd ..
|
2016-01-29 23:02:56 +01:00
|
|
|
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
|