summaryrefslogtreecommitdiff
path: root/release
blob: a56c13139f3149f8f64e7ca9d90b34adc8bdd3ff (plain)
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
#!/bin/sh -ex

VERSION=$1
if test -z "$VERSION"; then
   echo $0: usage: $0 version
   exit 1
fi

if test -n "$(git status --porcelain)"; then
   echo $0: git status is wordy, you probably want to stash and note your branch
   exit 2
fi
dch -b -v 1:${VERSION}-trunk release $VERSION
dch -r ''
git add debian/changelog
git commit -m "release $VERSION"
TAGNAME=$(echo $VERSION | sed -e 's/~/%7E/') # sigh
git tag $TAGNAME -m "release $VERSION"
git checkout --detach
git clean -fxd
git rm .gitignore
git rm -r debian
git rm release
echo $VERSION > VERSION
sed -e "s/@VERSION@/$VERSION/" README.in > README
git rm README.in
sed -i -e "s/__DEV__/$VERSION/" configure.ac
libtoolize -ic
autoreconf
rm -rf autom4te.cache
git add -A
#git commit -m "release $VERSION"
TREE=$(git write-tree)
COMMIT=$(echo release artifact for $VERSION | git commit-tree $TREE -p HEAD -p remotes/origin/release/artifact)
git tag release/$TAGNAME -m "release $VERSION processed for git archive" $COMMIT
git push origin $TAGNAME release/$TAGNAME $COMMIT:release/artifact
git reset --hard master
git checkout master