Skip to content

Commit

Permalink
R: generate version string instead of taking VERSION file.
Browse files Browse the repository at this point in the history
This is because if you forgot to run ../../bootstrap.sh, then
the version string of the R package was incorrect.
  • Loading branch information
gaborcsardi committed Oct 21, 2013
1 parent 3094e87 commit 3f90a53
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Find out our version number, need git for this
printf "Finding out version number/string... "
git describe HEAD --tags | rev | sed 's/g-/./' | sed 's/-/+/' | rev > VERSION
tools/getversion.sh > VERSION
cat VERSION

for i in glibtoolize libtoolize; do
Expand Down
2 changes: 1 addition & 1 deletion interfaces/R/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VERSION=$(shell ./tools/convertversion.sh ../../VERSION)
VERSION=$(shell ./tools/convertversion.sh)
DATAVERSION=0.1
top_srcdir=../..

Expand Down
2 changes: 1 addition & 1 deletion interfaces/R/tools/convertversion.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh

vstring=`cat ../../VERSION`
vstring=`../../tools/getversion.sh`
if echo "$vstring" | grep -q '\+'; then
pvstring=`echo $vstring |
sed 's/\(^[0-9\.]*\)[^+]*[+]*\([0-9][0-9]*\)\.\([0-9a-f]*\)$/\1|\2|\3/'`
Expand Down
3 changes: 3 additions & 0 deletions tools/getversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/sh

git describe HEAD --tags | rev | sed 's/g-/./' | sed 's/-/+/' | rev

0 comments on commit 3f90a53

Please sign in to comment.