@@ -51,11 +51,18 @@ IFS='.' read -r _maj _min _pat _twk <<< $version
5151_pat=${_pat:- 0}
5252_twk=${_twk:- 0}
5353
54+ if [ $_pat == 0 ]; then
55+ lcfversion=" ${_maj} .${_min} "
56+ else
57+ lcfversion=" ${_maj} .${_min} .${_pat} "
58+ fi
59+
5460echo " Updating Version in:"
5561
5662file=" CMakeLists.txt"
5763print_file
5864sed -i " /EasyRPG_Player VERSION/,1 s/[0-9]\(.[0-9]\)\{1,3\}/$version /" $file
65+ sed -i " /liblcf VERSION/,1 s/[0-9]\(.[0-9]\)\{1,3\}/$lcfversion /" $file
5966print_verbose " VERSION " $file
6067
6168file=configure.ac
@@ -64,11 +71,14 @@ sed -i -e "/ep_version_major/,1 s/\[[0-9]\+\]/[$_maj]/" \
6471 -e " /ep_version_minor/,1 s/\[[0-9]\+\]/[$_min ]/" \
6572 -e " /ep_version_patch/,1 s/\[[0-9]\+\]/[$_pat ]/" \
6673 -e " /ep_version_tweak/,1 s/\[[0-9]\+\]/[$_twk ]/" $file
74+ sed -i " /liblcf >= /,1 s/[0-9]\(.[0-9]\)\{1,3\}/$lcfversion /" $file
6775print_verbose ' m4_define(\[ep_version_' $file
76+ print_verbose " liblcf >= [0-9]" $file
6877
78+ # + 2 because of two extra commits: version commit itself & merge commit
6979file=" builds/android/gradle.properties"
7080print_file
71- _android_commits=` git rev-list HEAD --count`
81+ _android_commits=$(( `git rev- list HEAD -- count` + 2 ))
7282sed -i -e " /VERSION_NAME/,1 s/[0-9]\(.[0-9]\)\{1,3\}/$version /" \
7383 -e " /VERSION_CODE/,1 s/[0-9]\+/${_android_commits} /" $file
7484print_verbose ' VERSION_.*=[0-9]' $file
0 commit comments