Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
* origin/master:
  replace common exports with reusable shell scripts
  • Loading branch information
wildone committed Oct 8, 2019
2 parents bc729c2 + a5f24ae commit 84fb48c
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,8 @@ services:
- 'docker'

before_install:
- echo GET CONFIG FROM DOCKERFILE
- export IMAGE_NAME=$(grep imagename= Dockerfile | sed -e 's/.*imagename="\(.*\)".*/\1/')
- export TEST_COMMAND=$(grep test.command= Dockerfile | sed -e 's/.*test.command="\(.*\)".*/\1/')
- export TEST_COMMAND_VERIFY=$(grep test.command.verify= Dockerfile | sed -e 's/.*test.command.verify="\(.*\)".*/\1/')
- export IMAGE_VERSION=$(grep version= Dockerfile | sed -e 's/.*version="\(.*\)".*/\1/')
- export IMAGE="$ORGANISATION_NAME/$IMAGE_NAME"
- echo IMAGE_NAME=$IMAGE_NAME
- echo IMAGE_VERSION=$IMAGE_VERSION
- echo TEST_COMMAND=$TEST_COMMAND
- echo TEST_COMMAND_VERIFY=$TEST_COMMAND_VERIFY
- echo GET CONFIG FROM GIT
- export CURRENT_VERSION=$(git describe --tag --always --long | sed -e 's/\(.*\)-\(.*\)-.*/\1.\2/')
- declare -a CURRENT_VERSION_ARRAY="(${CURRENT_VERSION//./ })"; export SEMVER_MAJOR=${CURRENT_VERSION_ARRAY[0]}; export SEMVER_MINOR=${CURRENT_VERSION_ARRAY[1]}; export SEMVER_PATCH=${CURRENT_VERSION_ARRAY[2]}; export SEMVER_BUILD=${CURRENT_VERSION_ARRAY[-1]}
- export SEMVER_BUILD=$(( ${SEMVER_PATCH} + ${SEMVER_BUILD} ))
- echo SEMVER_MAJOR:${SEMVER_MAJOR}
- echo SEMVER_MINOR:${SEMVER_MINOR}
- echo SEMVER_BUILD:${SEMVER_BUILD}
- export SEMVER=${SEMVER_MAJOR}.${SEMVER_MINOR}.${SEMVER_BUILD}
- echo SEMVER:$SEMVER
- if [[ ${SEMVER_MAJOR} == "" ]]; then travis_terminate 1; fi
- export TRAVIS_TAG=$SEMVER
- echo TRAVIS_TAG:$TRAVIS_TAG
- "source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/get_config.sh)"
- "source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/get_version.sh)"

#build and test
install:
Expand Down

0 comments on commit 84fb48c

Please sign in to comment.