snappy-java/script/dynver.sh
Taro L. Saito a794389cf2
Upgrade to snappy-1.1.9 (#379)
* Upgrade to snappy-1.1.9

* Add sbt-dynver

* Fix script so as not to requrie perl

* Upgrade bitshuffle to 0.5.1

* use bitshuffle 0.3.4, which can be compiled without errors

* Add native library build workflow
2023-01-27 22:33:12 -08:00

22 lines
670 B
Bash
Executable File

#!/bin/sh
# Compute sbt-dynver-compatible version number
BUILD_TIME=`date '+%Y%m%d-%H%M'`
DYN_VER=`git describe --long --tags --abbrev=8 --match "v[0-9]*" --always --dirty="-${BUILD_TIME}"`
GIT_DIST=`echo ${DYN_VER} | sed -re "s/v([^-]*)-([0-9]+)-g(.*)/\2/g"`
GIT_TAG=`git describe --tags --dirty`
RELEASE_VERSION=`echo ${DYN_VER} | sed -re "s/v([^-]*)-([0-9]+)-g(.*)/\1/g"`
SNAPSHOT_VERSION=`echo ${DYN_VER} | sed -re "s/v([^-]*)-([0-9]+)-g(.*)/\1-\2-\3/g"`-SNAPSHOT
if [ ${GIT_DIST} -eq 0 ]; then
if [ ${GIT_TAG} == *"-dirty" ]; then
VERSION=${SNAPSHOT_VERSION}
else
VERSION=${RELEASE_VERSION}
fi
else
VERSION=${SNAPSHOT_VERSION}
fi
echo ${VERSION}