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"
|
||||
minor="$2"
|
||||
rev="$3"
|
||||
suffix="$4"
|
||||
suffix="${4:+-$4}"
|
||||
|
||||
version="$major.$minor.$rev$suffix"
|
||||
|
||||
# pre-formatted suffix
|
||||
fsuffix=
|
||||
|
@ -34,11 +36,17 @@ cat version.js.tpl | sed "
|
|||
s/@MAJOR@/$major/;
|
||||
s/@MINOR@/$minor/;
|
||||
s/@REV@/$rev/;
|
||||
s/@SUFFIX@/$suffix/;
|
||||
s/@SUFFIX@/${suffix#-}/;
|
||||
" > ../lib/version.js
|
||||
|
||||
# output version for docs
|
||||
cat - > ../doc/version.texi <<EOF
|
||||
@c DO NOT MODIFY; generated by verset (not autoconf)
|
||||
@set VERSION $major.$minor.$rev$fsuffix
|
||||
@set VERSION $version
|
||||
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