Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (17 sloc) 778 Bytes
#!/bin/bash
trap '>&2 echo Release failed \(line $LINENO\)' ERR
set -o nounset -o errexit
TRAVIS_BRANCH="${TRAVIS_BRANCH:-$(git rev-parse --abbrev-ref HEAD)}"
>&2 echo "Current branch: $TRAVIS_BRANCH"
test "$TRAVIS_BRANCH" = "master"
test -f docs/_data/status.yml
grep updated: docs/_data/status.yml | grep -qo '[0-9-]*'
updated=$(grep updated: docs/_data/status.yml | grep -o '[0-9-]*' | sed s/-//g)
>&2 echo "Database updated: $updated"
releasedVer=$(git describe --abbrev=0 --tags)
>&2 echo "Latest version: $releasedVer"
grep -qP '^v\d+\.\d+\.\d+' <<< "$releasedVer"
nextVer=$(awk -v date=$updated -F'[.+]' '{print $1 "." $2 "." ($3 + 1) "+" date}' <<< "$releasedVer")
>&2 echo "Proposed version: $nextVer"
grep -qP '^v\d+\.\d+\.\d+' <<< "$releasedVer"
echo $nextVer
You can’t perform that action at this time.