summaryrefslogtreecommitdiff
path: root/release
blob: c3ed2c6f69ff6fc94741e6f0c7d2e2766bae8d70 (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
#!/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 -v 1:${VERSION}-trunk release $VERSION
git add debian/changelog
git commit -m "release $VERSION"
git tag $VERSION -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/$VERSION -m "release $VERSION processed for git archive" $COMMIT
git push origin $COMMIT:release/artifact
git reset --hard master
git checkout master