~chrisppy/beagles

ref: v0.2.0 beagles/mkrelease.sh -rwxr-xr-x 736 bytes
c14a6fceChris Palmer Updates for 0.2.0 release 1 year, 18 days ago
                                                                                
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

t=$1

cver=$(awk '/^VERSION=/ {print $0}' Makefile | awk -F '=' '{print $2}')
printf "Current Version: %s\\n" "${cver}"

major=$(echo "${cver}" | awk -F '.' '{print $1}')
minor=$(echo "${cver}" | awk -F '.' '{print $2}')
patch=$(echo "${cver}" | awk -F '.' '{print $3}')

case "${t}" in
	"major")
		major=$((major+1))
		minor=0
		patch=0
		;;
	"minor")
		minor=$((minor+1))
		patch=0
		;;
	"patch")
		patch=$((patch+1))
		;;
	*)
		printf "unsupported; use major, minor, or patch\\n"
		exit 1
		;;
esac

ver="${major}.${minor}.${patch}"
printf "New Version: %s\\n" "${ver}"

sed -i "s/${cver}/${ver}/g" Makefile
sed -i "s/${cver}/${ver}/g" doc/beagles.1.scd
sed -i "s/${cver}/${ver}/g" doc/beagles-config.5.scd

make package