Updating method for getting latest tag
This commit is contained in:
@@ -31,9 +31,7 @@ before_install:
|
|||||||
- sudo apt-get -qq update
|
- sudo apt-get -qq update
|
||||||
- eval "${MATRIX_EVAL}"
|
- eval "${MATRIX_EVAL}"
|
||||||
|
|
||||||
install:
|
#install:
|
||||||
- sudo apt-get install jq
|
|
||||||
- jq --help
|
|
||||||
# - sudo apt-get install -y libboost-test-dev
|
# - sudo apt-get install -y libboost-test-dev
|
||||||
# - sudo apt-get install -y libboost-thread-dev
|
# - sudo apt-get install -y libboost-thread-dev
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
# GitHub and stages the files for nrtest to run. The script assumes that
|
# GitHub and stages the files for nrtest to run. The script assumes that
|
||||||
# before-test.sh and gen-config.sh are located together in the same folder.
|
# before-test.sh and gen-config.sh are located together in the same folder.
|
||||||
|
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
unset PLATFORM;
|
unset PLATFORM;
|
||||||
else
|
else
|
||||||
@@ -61,13 +62,10 @@ SUT_PATH=(`find $BUILD_HOME -name "bin" -type d`)
|
|||||||
|
|
||||||
# TODO: determine platform
|
# TODO: determine platform
|
||||||
|
|
||||||
# determine latest tag from GitHub API
|
# hack to determine latest tag from GitHub
|
||||||
LATEST_URL="https://api.github.com/repos/openwateranalytics/epanet-example-networks/releases/latest"
|
LATEST_URL="https://github.com/OpenWaterAnalytics/epanet-example-networks/releases/latest"
|
||||||
LATEST_TAG=(`curl ${LATEST_URL} | jq -r .tag_name`)
|
temp_url=$(curl -sI ${LATEST_URL} | grep -iE "^Location:")
|
||||||
if [ ${LATEST_TAG} == 'null' ]; then
|
LATEST_TAG=$(echo ${temp_url##*/})
|
||||||
echo "ERROR: curl | jq - ${LATEST_URL}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
TEST_URL="https://github.com/OpenWaterAnalytics/epanet-example-networks/archive/${LATEST_TAG}.tar.gz"
|
TEST_URL="https://github.com/OpenWaterAnalytics/epanet-example-networks/archive/${LATEST_TAG}.tar.gz"
|
||||||
BENCH_URL="https://github.com/OpenWaterAnalytics/epanet-example-networks/releases/download/${LATEST_TAG}/benchmark-${PLATFORM}-${REF_BUILD_ID}.tar.gz"
|
BENCH_URL="https://github.com/OpenWaterAnalytics/epanet-example-networks/releases/download/${LATEST_TAG}/benchmark-${PLATFORM}-${REF_BUILD_ID}.tar.gz"
|
||||||
|
|||||||
Reference in New Issue
Block a user