From e9c1c7591dd3a4bfd5297d60c8ff9b1744cacdd9 Mon Sep 17 00:00:00 2001 From: "Charlton, Scott R" Date: Wed, 29 Sep 2021 16:15:35 -0600 Subject: [PATCH] updated versioning --- jenkins-R-dist.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/jenkins-R-dist.sh b/jenkins-R-dist.sh index 36cad362..11e205cb 100755 --- a/jenkins-R-dist.sh +++ b/jenkins-R-dist.sh @@ -7,6 +7,7 @@ if [ -z "$DATE" ]; then DATE=$(date "+%x") fi DATE=$(date -d $DATE --rfc-3339=date) +export DATE # # set VER @@ -14,11 +15,10 @@ DATE=$(date -d $DATE --rfc-3339=date) if [ -z "$VER" ]; then ###wget https://cran.r-project.org/package=phreeqc -O index.xhtml 2> /dev/null ###VER=`xmlstarlet sel -t -m "/_:html/_:body/_:table[1]/_:tr[1]/_:td[2]" -v . -n index.xhtml 2> /dev/null` - VER=$(curl https://raw.githubusercontent.com/usgs-coupled/phreeqc-version/main/phreeqc-version.txt) + VER=$(curl -sS https://raw.githubusercontent.com/usgs-coupled/phreeqc-version/main/next_ver.sh | sh) ver_major=$(echo "$VER" | cut -d '.' -f 1) ver_minor=$(echo "$VER" | cut -d '.' -f 2) ver_patch=$(echo "$VER" | cut -d '.' -f 3) - ver_patch=$((ver_patch+1)) else ver_major=$(echo "$VER" | cut -d '.' -f 1) ver_minor=$(echo "$VER" | cut -d '.' -f 2) @@ -33,14 +33,16 @@ export VER # # set REL # -curl https://raw.githubusercontent.com/usgs-coupled/phreeqc-version/main/ver.py -o ver.py -HEAD=$(python3 ver.py) -if [ -z "$REL" ]; then - REL="$HEAD" -fi +# curl https://raw.githubusercontent.com/usgs-coupled/phreeqc-version/main/ver.py -o ver.py +# HEAD=$(python3 ver.py) +# if [ -z "$REL" ]; then +# REL="$HEAD" +# fi +REL=$(curl -sS https://raw.githubusercontent.com/usgs-coupled/phreeqc-version/main/rel.py | python3) +export REL # sed files /bin/sh jenkins-dist.sh -v ${VER} -r ${REL} -d ${DATE} -pr ${TAG} cd R -make VERSION=${VER} RELEASE_DATE=${DATE} build make VERSION=${VER} RELEASE_DATE=${DATE} check +make VERSION=${VER} RELEASE_DATE=${DATE} build