Skip to content

Commit

Permalink
replace common exports with reusable shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rickyliumerkle committed Oct 7, 2019
1 parent 17e6567 commit de7fff4
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 @@ -17,16 +17,7 @@ cache:


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
- source <(curl -s https://raw.githubusercontent.com/aem-design/aemdesign-docker/master/scripts/travis/get_config.sh)
- echo DOWNLOAD PACKAGES
- echo $PACKAGE_PATH
- echo $JAR_PATH
Expand All @@ -39,18 +30,7 @@ before_install:
- echo DOWNLOAD JAR INTO ${JAR_PATH}
- ./scripts/gdrive.sh "download" "$GOOGLE_DRIVEID" "$JAR_PATH/aem-quickstart.jar"
- ls -latr $JAR_PATH
- 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 -s https://raw.githubusercontent.com/aem-design/aemdesign-docker/master/scripts/travis/get_version.sh)

#build and test
install:
Expand Down

0 comments on commit de7fff4

Please sign in to comment.