Skip to content

Commit

Permalink
Apply GitHub's recommends versioning rule
Browse files Browse the repository at this point in the history
  • Loading branch information
soburi committed Sep 4, 2018
1 parent 5595ae7 commit 68f6970
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dist/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ if [ "${TRAVIS_TAG}" == "" ] ; then
RELEASEVER=${TRAVIS_BRANCH}-0.0.$(date -d @`git log -1 ${TRAVIS_COMMIT} --pretty=medium --format=%ct` +%y%m%d%H%M)
BM_FORCEOPT='-f'
else
RELEASELINE=${GHREPO_NAME}
RELEASELINE_=$(echo ${TRAVIS_TAG} | sed 's/-.*$//')
if [ "${RELEASELINE_}" != "${TRAVIS_TAG}" ] ; then
if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then
RELEASELINE="intiki"
elif [ "${RELEASELINE_}" != "${TRAVIS_TAG}" ] ; then
RELEASELINE=${RELEASELINE_}
else
RELEASELINE=${GHREPO_NAME}
fi

PKGJSON=package_${GHREPO_USER}_${RELEASELINE}_index.json
ARCHIVENAME=${GHREPO_NAME}-${TRAVIS_TAG}
ARCHIVEURL="https://github.com/${TRAVIS_REPO_SLUG}/releases/download/${TRAVIS_TAG}/${ARCHIVENAME}.tar.bz2"
RELEASEVER=${TRAVIS_TAG}
RELEASEVER=$(echo ${TRAVIS_TAG} | rev | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' | rev )
BM_FORCEOPT=
fi

Expand Down

0 comments on commit 68f6970

Please sign in to comment.