Modified tools/version to update package.json and configure.ac
parent
10bf2540c7
commit
6c4c2322bb
14
tools/verset
14
tools/verset
|
@ -23,7 +23,9 @@
|
||||||
major="$1"
|
major="$1"
|
||||||
minor="$2"
|
minor="$2"
|
||||||
rev="$3"
|
rev="$3"
|
||||||
suffix="$4"
|
suffix="${4:+-$4}"
|
||||||
|
|
||||||
|
version="$major.$minor.$rev$suffix"
|
||||||
|
|
||||||
# pre-formatted suffix
|
# pre-formatted suffix
|
||||||
fsuffix=
|
fsuffix=
|
||||||
|
@ -34,11 +36,17 @@ cat version.js.tpl | sed "
|
||||||
s/@MAJOR@/$major/;
|
s/@MAJOR@/$major/;
|
||||||
s/@MINOR@/$minor/;
|
s/@MINOR@/$minor/;
|
||||||
s/@REV@/$rev/;
|
s/@REV@/$rev/;
|
||||||
s/@SUFFIX@/$suffix/;
|
s/@SUFFIX@/${suffix#-}/;
|
||||||
" > ../lib/version.js
|
" > ../lib/version.js
|
||||||
|
|
||||||
# output version for docs
|
# output version for docs
|
||||||
cat - > ../doc/version.texi <<EOF
|
cat - > ../doc/version.texi <<EOF
|
||||||
@c DO NOT MODIFY; generated by verset (not autoconf)
|
@c DO NOT MODIFY; generated by verset (not autoconf)
|
||||||
@set VERSION $major.$minor.$rev$fsuffix
|
@set VERSION $version
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# update package.json for npm
|
||||||
|
sed -i 's/"version":.*/"version": "'$version'",/' ../package.json
|
||||||
|
|
||||||
|
# update configure script by replacing the second argument of AC_INIT
|
||||||
|
sed -i '/^AC_INIT/s/, \[[^]]\+\]/, ['$version']/' ../configure.ac
|
||||||
|
|
Loading…
Reference in New Issue