diff --git a/.travis.yml b/.travis.yml index ca49bf8..35d10f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,20 +2,9 @@ sudo: false language: php -php: -- 7.0 -- 7.1 -- 7.2 - env: global: - typo3DatabaseHost=localhost typo3DatabaseName=typo3 typo3DatabaseUsername=travis typo3DatabasePassword='' - matrix: - - TYPO3_VERSION="^8.7" - - TYPO3_VERSION="^8.7" DEPENDENCIES_PREFERENCE="--prefer-lowest" - -matrix: - exclude: cache: directories: @@ -26,8 +15,13 @@ before_install: - phpenv config-rm xdebug.ini install: -- composer require typo3/minimal "$TYPO3_VERSION" $DEPENDENCIES_PREFERENCE -- git checkout . +- > + composer require typo3/minimal:"$TYPO3" --prefer-stable --prefer-dist $DEPENDENCIES_PREFERENCE; + composer show; +- > + echo; + echo "Restoring the composer.json"; + git checkout .; script: - > @@ -49,3 +43,44 @@ script: echo; echo "Running the functional tests"; composer ci:tests:functional; + +jobs: + include: + - stage: test + php: 7.2 + env: TYPO3=^8.7 + - stage: test + php: 7.1 + env: TYPO3=^8.7 + - stage: test + php: 7.0 + env: TYPO3=^8.7 + - stage: test + php: 7.2 + env: TYPO3=^8.7 DEPENDENCIES_PREFERENCE="--prefer-lowest" + - stage: test + php: 7.1 + env: TYPO3=^8.7 DEPENDENCIES_PREFERENCE="--prefer-lowest" + - stage: test + php: 7.0 + env: TYPO3=^8.7 DEPENDENCIES_PREFERENCE="--prefer-lowest" + - stage: release to ter + if: tag IS present AND env(TYPO3_ORG_USERNAME) IS present AND env(TYPO3_ORG_PASSWORD) IS present + php: 7.0 + before_install: skip + install: skip + before_script: skip + script: + - > + echo; + echo "Preparing upload of release ${TRAVIS_TAG} to TER"; + echo; + echo; + composer global require helhum/ter-client; + - > + TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`; + echo; + echo "Uploading release ${TRAVIS_TAG} to TER"; + echo; + echo; + $HOME/.composer/vendor/bin/ter-client upload tea . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"; diff --git a/CHANGELOG.md b/CHANGELOG.md index 97b0443..e02a689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## x.y.z ### Added +- Auto-release to the TER (#34) - Composer script for PHP linting ### Changed