Skip to content

Commit

Permalink
Merge pull request #28 from sabbelasichon/task/ter-release
Browse files Browse the repository at this point in the history
[TASK] Release extension to ter via travis
  • Loading branch information
sabbelasichon authored Feb 22, 2020
2 parents 8251d4e + c66ea64 commit 23937f2
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
/.php_cs
/.php_cs.cache
/composer.lock
/Resources
/!Resources/Private/Templates/*
/TODO.md
/Resources/Private/Page.html
/Resources/Public
/Resources/Private/Php/Libraries/vendor
/phpunit.xml
/build
/var
/Libraries/*
!/Libraries/composer.json
!/Libraries/composer.lock
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,25 @@ script:
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit --colors -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}'
jobs:
fast_finish: true
include:
- stage: 🚢 to TER
if: tag IS present
php: 7.2
install: skip
before_script: skip
script:
- |
if [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then
echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n";
# Install ter client
composer global require helhum/ter-client
# Install dependencies
composer run-script extension-build
# Upload
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
$HOME/.composer/vendor/bin/ter-client upload typo3_encore . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;
13 changes: 13 additions & 0 deletions Resources/Private/Php/Libraries/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"config": {
"platform": {
"php": "7.2.5"
},
"classmap-authoritative": true,
"prepend-autoloader": false
},
"require": {
"symfony/web-link": "^4.3",
"symfony/asset": "^5.0"
}
}
257 changes: 257 additions & 0 deletions Resources/Private/Php/Libraries/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
"post-autoload-dump": [
"mkdir -p .Build/Web/typo3conf/ext/",
"[ -L .Build/Web/typo3conf/ext/typo3_encore ] || ln -snvf ../../../../. .Build/Web/typo3conf/ext/typo3_encore"
],
"extension-create-libs": [
"@composer install -d Resources/Private/Php/Libraries"
],
"extension-build": [
"@extension-create-libs"
]
},
"extra": {
Expand Down
5 changes: 4 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


if (! defined('TYPO3_MODE')) {
die('Access denied.');
}
Expand Down Expand Up @@ -29,3 +28,7 @@
// Enable for Frontend and Backend at the same time
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][$packageKey] = \Ssch\Typo3Encore\Integration\PageRendererHooks::class . '->renderPreProcess';
}, 'typo3_encore');

if (!\TYPO3\CMS\Core\Core\Environment::isComposerMode()) {
require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('typo3_encore') . '/Resources/Private/Php/Libraries/vendor/autoload.php';
}

0 comments on commit 23937f2

Please sign in to comment.