diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-10-04 14:33:16 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2012-09-30 15:24:50 -0400 |
| commit | 3aee1ac3a199a40020e204e42ed9a48e2f4e1404 (patch) | |
| tree | 3ad69a4a2ef254394cf3174b80f21942e7b9065a /release/common | |
| parent | 52cdea653c9b3a7055bca40e4019f599d9291bb6 (diff) | |
Create some Openbox release scripts
release/bugs: Prints a list of bugs that are mentioned in git commits for a
git revision, since previous release.
- Very useful for updating the CHANGELOG file!
release/go: Tests a git revision for correct compilation, and prepares files
for release.
- Makes the tarball
- Makes a GPG signature for the tarball
- Tags the release
- Spits out URLs to edit and gives the changelog for copy/paste.
release/email: Sends an email to the Openbox mailing list with the changelog
and details about the release. Call this with the same parameters used for
running release/go once it is finished, and the files are uploaded, etc.
- Also emails mikachu re freshmeat.net
Diffstat (limited to 'release/common')
| -rw-r--r-- | release/common | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/release/common b/release/common new file mode 100644 index 00000000..56093c0a --- /dev/null +++ b/release/common @@ -0,0 +1,56 @@ +#!/bin/sh + +NOW=$(date +%s) +SRCDIR="$PWD" +WORKDIR="/tmp/openbox.$NOW" +TESTDIR="$WORKDIR/.test" + +clean() { + cd "$SRCDIR" + if test -d "$WORKDIR"; then + chmod -R +w "$WORKDIR" + rm -r -f "$WORKDIR" + fi +} + +error() { + echo "error: $1" + test -n "$2" && echo "$2" + clean + exit 1 +} + +RELEASE_SHA=$(git rev-parse "$REV") +test $? = 0 || error "revision $REV not found" + +#NON_MASTER=$(git rev-list $RELEASE_SHA ^master) +#test $? = 0 || error "git rev-list failed" +#test -z $NON_MASTER || error "REVISION contains commits not on master" + +git new-workdir "$SRCDIR" "$WORKDIR" +test $? = 0 || error "git-new-workdir failed" + +echo "working in $WORKDIR" + +cd "$WORKDIR" +test $? = 0 || error "cd to $WORKDIR failed" + +git checkout -q $RELEASE_SHA +test $? = 0 || error "git-checkout failed" + +# get last release +if test -z "$LAST"; then + LAST=$(git describe --match 'release-*' --abbrev=0 $REV) + test $? = 0 || \ + error "unable to find last release" + echo "Using previous release as $LAST" +fi + +H="$(head -1 CHANGELOG|cut -d: -f 1)" +test $H = $VERSION || + error "CHANGELOG does not contain version $VERSION" + +CL="$(cat CHANGELOG|sed -n /^$VERSION:\$/,/^\$/p|tail -n +2|head -n -1)" +CLNOWRAP=$(echo "$CL" \ + |sed -e "s/^ \*/*/"|sed -n '1h;1!H;${;g;s/\n / /g;p;}') +SHORTLOG="$(git shortlog --no-merges $LAST..$REV)" |
