repo.or.cz
/
nobug.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
use a VERSION file to track the version
[nobug.git]
/
admin
/
update_version.sh
blob
af18d3ddcac3338aedf0ad4f05b942db579d2d94
1
#!/bin/bash
2
3
last
=
$
(<
VERSION
)
4
5
last_major
=
${last%.*}
6
last_minor
=
${last#*.}
7
8
current_major
=
$
(
date
+%
Y
%
m
)
9
current_minor
=
1
10
11
if
[[
$current_major
=
$last_major
]];
then
12
((
current_minor
+=
$last_minor
))
13
fi
14
15
current
=
$current_major
.
$current_minor
16
17
echo
$current
>
VERSION
18
git add VERSION
19
20
ed configure.ac
<<EOF
21
/AC_INIT/c
22
AC_INIT([nobug], [
$current
])
23
.
24
w
25
q
26
EOF