Skip to content

Commit 401f768

Browse files
author
Felix Arntz
committed
Automatically run additional composer script when running the main one.
1 parent 6512746 commit 401f768

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,10 @@ before_script:
7373
- |
7474
if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then
7575
phpenv global 5.4
76-
cd php52
7776
composer install
78-
cd ..
7977
phpenv global "$TRAVIS_PHP_VERSION"
8078
else
8179
composer install
82-
cd php52
83-
composer install
84-
cd ..
8580
fi
8681
- |
8782
if [[ "$NPM_TESTS" != "1" ]]; then

composer.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,23 @@
1616
"neronmoon/scriptsdev": "^0.1.0"
1717
},
1818
"scripts": {
19-
"post-update-cmd": "vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility/PHPCompatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility",
20-
"post-install-cmd": "vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility/PHPCompatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
19+
"post-update-cmd": [
20+
"cd php52; composer update; cd ..",
21+
"vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility/PHPCompatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
22+
],
23+
"post-install-cmd": [
24+
"cd php52; composer install; cd ..",
25+
"vendor/bin/phpcs --config-delete installed_paths; rm -rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; cp -rp vendor/wimg/php-compatibility/PHPCompatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility"
26+
]
2127
},
2228
"scripts-dev": {
23-
"post-update-cmd": "vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/",
24-
"post-install-cmd": "vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/"
29+
"post-update-cmd": [
30+
"cd php52; composer update; cd ..",
31+
"vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/"
32+
],
33+
"post-install-cmd": [
34+
"cd php52; composer install; cd ..",
35+
"vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs/"
36+
]
2537
}
2638
}

0 commit comments

Comments
 (0)