File: make-release.sh

package info (click to toggle)
luxio 8-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 504 kB
  • ctags: 476
  • sloc: ansic: 3,014; makefile: 142; sh: 24
file content (38 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download
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/bash

# check for pending changes
PENDING=$(bzr status -S)

if [ "x$PENDING" != "x" ]; then
    echo There are pending changes - you should commit these.
    echo $PENDING
    exit 1
fi

LAST_TAG=$(bzr tags | tail -n 1 | cut -d' ' -f1 | cut -d'-' -f2)
NEW_VER=$(($LAST_TAG + 1))

echo Last release was $LAST_TAG - the new release will be $NEW_VER

echo Changing release number in luxio.c
sed -e"s/^\#define LUXIO_RELEASE $LAST_TAG/#define LUXIO_RELEASE $NEW_VER/" -i luxio.c

echo commiting change and tagging
bzr commit -m "Update release number to $NEW_VER"
bzr tag luxio-$NEW_VER

echo exporting directory
bzr export --format dir ../luxio-$NEW_VER

pushd ../luxio-$NEW_VER

echo Generating documentation
ldoc .

cd ..

echo tar...
tar cvfj luxio-$NEW_VER.tar.bz2 luxio-$NEW_VER
rm -rf luxio-$NEW_VER

popd