-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use g1a/composer-test-scenarios to test more php versions. (#84)
- Loading branch information
1 parent
2d6b255
commit f94a689
Showing
11 changed files
with
3,361 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
SCENARIO=$1 | ||
DEPENDENCIES=${2-install} | ||
|
||
# Convert the aliases 'highest', 'lowest' and 'lock' to | ||
# the corresponding composer command to run. | ||
case $DEPENDENCIES in | ||
highest) | ||
DEPENDENCIES=update | ||
;; | ||
lowest) | ||
DEPENDENCIES='update --prefer-lowest' | ||
;; | ||
lock|default|"") | ||
DEPENDENCIES=install | ||
;; | ||
esac | ||
|
||
original_name=scenarios | ||
recommended_name=".scenarios.lock" | ||
|
||
base="$original_name" | ||
if [ -d "$recommended_name" ] ; then | ||
base="$recommended_name" | ||
fi | ||
|
||
# If scenario is not specified, install the lockfile at | ||
# the root of the project. | ||
dir="$base/${SCENARIO}" | ||
if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then | ||
SCENARIO=default | ||
dir=. | ||
fi | ||
|
||
# Test to make sure that the selected scenario exists. | ||
if [ ! -d "$dir" ] ; then | ||
echo "Requested scenario '${SCENARIO}' does not exist." | ||
exit 1 | ||
fi | ||
|
||
echo | ||
echo "::" | ||
echo ":: Switch to ${SCENARIO} scenario" | ||
echo "::" | ||
echo | ||
|
||
set -ex | ||
|
||
composer -n validate --working-dir=$dir --no-check-all --ansi | ||
composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts | ||
composer -n --working-dir=$dir info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"name": "drupal-composer/drupal-scaffold", | ||
"description": "Composer Plugin for updating the Drupal scaffold files when using drupal/core", | ||
"type": "composer-plugin", | ||
"license": "GPL-2.0-or-later", | ||
"require": { | ||
"php": ">=5.4.5", | ||
"composer-plugin-api": "^1.0.0", | ||
"composer/semver": "^1.4" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"DrupalComposer\\DrupalScaffold\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"class": "DrupalComposer\\DrupalScaffold\\Plugin", | ||
"branch-alias": { | ||
"dev-master": "2.0.x-dev" | ||
} | ||
}, | ||
"scripts": { | ||
"cs": "phpcs --standard=PSR2 -n src", | ||
"cbf": "phpcbf --standard=PSR2 -n src", | ||
"unit": "phpunit --colors=always", | ||
"lint": [ | ||
"find src -name '*.php' -print0 | xargs -0 -n1 php -l" | ||
], | ||
"test": [ | ||
"@lint", | ||
"@unit" | ||
], | ||
"scenario": ".scenarios.lock/install", | ||
"post-update-cmd": [ | ||
"create-scenario phpunit4 'phpunit/phpunit:^4.8.36' --platform-php '5.5.27'" | ||
] | ||
}, | ||
"config": { | ||
"optimize-autoloader": true, | ||
"sort-packages": true, | ||
"platform": { | ||
"php": "5.5.27" | ||
}, | ||
"vendor-dir": "../../vendor" | ||
}, | ||
"require-dev": { | ||
"composer/composer": "dev-master", | ||
"g1a/composer-test-scenarios": "^2.1.0", | ||
"phpunit/phpunit": "^4.8.36", | ||
"squizlabs/php_codesniffer": "^2.8" | ||
}, | ||
"minimum-stability": "stable" | ||
} |
Oops, something went wrong.