Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further simplify extension build and release #732

Merged
merged 1 commit into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/Libraries/ export-ignore
/Resources/Private/ExtensionArtifacts/src/ export-ignore
/Resources/Private/ExtensionArtifacts/ext_localconf.php export-ignore
/Tests/ export-ignore
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/typo3cms

/Configuration/Console/AllCommands.php
/Libraries/*
/Libraries/vendor
/ext_emconf.php
/ext_icon.png
/Resources/Public/Icons/Extension.png
Expand Down
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ before_script:
# If this fails, we forgot to update version numbers before tagging the release
test -z "$(git diff --shortstat 2> /dev/null | tail -n1)";
fi
- composer extension-create-libs && ls -la Libraries/*.phar | grep -v ^-rwx
- git clean -dffx
- composer require typo3/cms="$TYPO3_VERSION"
- git checkout composer.json

Expand Down Expand Up @@ -87,16 +85,15 @@ jobs:
- |
if [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then
echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n";
# Cleanup before we upload
composer require --dev typo3/cms ^8.7
composer require --dev helhum/ter-client dev-master
git reset --hard HEAD && git clean -fx

# Install ter client
composer require --global helhum/ter-client

# Build extension files
composer extension-release

# Upload
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
.Build/bin/ter-client upload typo3_console . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
$HOME/.composer/vendor/bin/ter-client upload typo3_console . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;
4 changes: 2 additions & 2 deletions Classes/Core/ConsoleBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ public function baseSetup($pathPart = '')
*/
protected function requireLibraries()
{
if (@file_exists($pharFile = dirname(dirname(__DIR__)) . '/Libraries/symfony-process.phar')) {
include 'phar://' . $pharFile . '/vendor/autoload.php';
if (@file_exists($libAutoload = dirname(dirname(__DIR__)) . '/Libraries/vendor/autoload.php')) {
require $libAutoload;
}
}

Expand Down
12 changes: 12 additions & 0 deletions Libraries/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"config": {
"platform": {
"php": "5.5"
},
"classmap-authoritative": true,
"prepend-autoloader": false
},
"require": {
"symfony/process": "~2.7.0"
}
}
70 changes: 70 additions & 0 deletions Libraries/composer.lock

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

11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,7 @@
"cp -f ext_icon.png Resources/Public/Icons/Extension.png"
],
"extension-create-libs": [
"mkdir -p Libraries/temp",
"[ -f $HOME/.composer/vendor/bin/phar-composer ] || composer global require clue/phar-composer",
"if [ ! -f Libraries/symfony-process.phar ]; then cd Libraries/temp && composer require symfony/process=~2.7.0 && composer config classmap-authoritative true && composer config prepend-autoloader false && composer dump-autoload; fi",
"[ -f Libraries/symfony-process.phar ] || $HOME/.composer/vendor/bin/phar-composer build Libraries/temp/ Libraries/symfony-process.phar",
"chmod -x Libraries/*.phar",
"rm -f php_cs.cache",
"rm -rf Libraries/temp"
"@composer install -d Libraries"
],
"extension-build": [
"@extension-create-libs",
Expand All @@ -95,6 +89,7 @@
"rm Resources/Private/ExtensionArtifacts/ext_*",
"rm -rf Tests/",
"rm .gitattributes",
"rm -rf .github",
"rm .gitignore",
"rm .php_cs.dist",
"rm .styleci.yml",
Expand All @@ -103,7 +98,7 @@
"rm .travis.yml"
],
"extension-clean": [
"rm -rf Libraries Resources/Public/Icons",
"rm -rf Libraries/vendor Resources/Public/Icons",
"rm -f ext_*"
]
},
Expand Down