Skip to content

Commit cbdd0a6

Browse files
version number is now always set to latest tag
1 parent 6a1b800 commit cbdd0a6

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ LINKER = c++
8787

8888
COMPILER_FLAGS = -Wall -c -O2 -std=c++11 -fpic -DVERSION="`./version.sh`" -I. -g
8989
LINKER_FLAGS = -shared
90-
LINKER_DEPENDENCIES = -lphpcpp -lv8
90+
LINKER_DEPENDENCIES = -lphpcpp -lv8 -licui18n
9191

9292

9393
#

version.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
unset GREP_OPTIONS
55

66
# do we have a project number or version directory?
7-
project=$(pwd -P | grep -o -e "[#][[:digit:]]\+")
8-
version=$(pwd -P | grep -o -e "PxJavascript/[[:digit:]]\+[.][[:digit:]]\+[.]\?[[:digit:]]\?")
7+
version=$(git tag | tail -n 1)
98

109
# which one is set?
11-
if [ ! -z $project ]; then
12-
echo "project $project"
13-
elif [ ! -z $version ]; then
14-
echo $version | cut --delimiter=/ --fields=2
10+
if [ ! -z $version ]; then
11+
echo $version | cut --delimiter=v --fields=2
1512
else
1613
echo "dev"
1714
fi

0 commit comments

Comments
 (0)