blob: 201d5f62e31bc8512d244c06e40403af2e204e9f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/bin/bash
RELEASE_DIR=/home/bbb/releases
LIBLITMUS_DIR=/home/bbb/dev/liblitmus2008
LITMUS_DIR=/home/bbb/dev/litmus2008
BASE_TAG="v2.6.24"
TAG=$1
function die {
echo $1
echo
echo "Usage: make_release <TAG>"
echo "Example: make_release 2007.3"
echo "Given tag: '${TAG}'"
exit 1
}
if [ -z "$TAG" ]; then
die "TAG missing."
fi
function archive {
PREFIX=$1
TGZ=$2
TMP=`mktemp`
git archive --format=tar --prefix=$PREFIX/ $TAG > $TMP || \
die "Could not create archive from tree."
gzip -c $TMP > $TGZ || die "Could not compress."
rm $TMP
}
function release_liblitmus {
echo "Releasing liblitmus."
cd $LIBLITMUS_DIR || die "Could not cd to $LIBLITMUS_DIR."
archive liblitmus $TARGET/liblitmus-$TAG.tgz || die "Could not build archive."
return 0
}
function release_litmus {
echo "Releasing LITMUS^RT."
cd $LITMUS_DIR || die "Could not cd to $LITMUS_DIR."
git-diff -p --stat $BASE_TAG $TAG > $TARGET/litmus-rt-$TAG.patch || \
die "Could not create patch."
return 0
}
TARGET="$RELEASE_DIR/$TAG"
mkdir -p $TARGET || die "Could not make directory $TARGET."
release_litmus || die "Releasing LITMUS^RT failed."
release_liblitmus || die "Releasing liblitmus failed."
cd $TARGET
echo "Generating check sums."
sha256sum * > SHA256SUMS
echo "Release generated in $TARGET."
|