Skip to content

Commit

Permalink
Fixes #1415: Port deploy:* commands to Robo. (#1457)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored May 2, 2017
1 parent 668b5df commit 1c13c60
Show file tree
Hide file tree
Showing 14 changed files with 623 additions and 362 deletions.
1 change: 1 addition & 0 deletions bin/blt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ $robo_namespaces = [
'acsf',
'ci',
'custom',
'deploy',
'drupal',
'frontend',
'git',
Expand Down
3 changes: 0 additions & 3 deletions phing/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
<!-- Contains fileset definitions. E.g., patterns defining contrib locations, theming files, etc. -->
<import file="${phing.dir}/tasks/filesets.xml"/>

<!-- E.g., commit build artifacts, push to remote. -->
<import file="${phing.dir}/tasks/deploy.xml"/>

<!-- Contains local syncing tasks. -->
<import file="${phing.dir}/tasks/local-sync.xml"/>

Expand Down
345 changes: 0 additions & 345 deletions phing/tasks/deploy.xml

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/pipelines/build_artifact
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export PATH=${COMPOSER_BIN}:${PATH}

# Generate artifact in a separate directory.
export NEW_BUILD_DIR=/tmp/artifact
blt deploy:build -Ddeploy.dir=${NEW_BUILD_DIR}
blt deploy:build -D deploy.dir=${NEW_BUILD_DIR}
# Move git history to artifact directory. Required for pipelines to commit and push.
mv ${BUILD_DIR}/.git ${NEW_BUILD_DIR}/
# Allow dotfiles (hidden) to be globbed (via *).
Expand Down
2 changes: 1 addition & 1 deletion scripts/travis/deploy_branch
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ev

blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" -Ddeploy.branch="${TRAVIS_BRANCH}-build" -Ddeploy.git.failOnDirty=false
blt deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_BUILD_ID}" --branch "${TRAVIS_BRANCH}-build" -D --ignore-dirty --no-interaction -v

set +v
2 changes: 1 addition & 1 deletion scripts/travis/deploy_tag
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ev

blt deploy -Ddeploy.commitMsg="Automated commit by Travis CI for Build ${TRAVIS_TAG}" -Ddeploy.tag="${TRAVIS_TAG}-build" -Ddeploy.git.failOnDirty=false
blt deploy --commit-msg "Automated commit by Travis CI for Build ${TRAVIS_TAG}" --tag "${TRAVIS_TAG}-build" --ignore-dirty -v

set +v
7 changes: 4 additions & 3 deletions src/Robo/BltTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,21 @@ protected function invokeCommands(array $commands) {
*
* @param string $command_name
* The name of the command. E.g., 'tests:behat'.
* @param array $args
* An array of arguments to pass to the command.
*
* @return int
* The exit code of the command.
*/
protected function invokeCommand($command_name) {
protected function invokeCommand($command_name, array $args = []) {
/** @var \Robo\Application $application */
$application = $this->getContainer()->get('application');
$command = $application->find($command_name);
$args = [];
$input = new ArrayInput($args);
$prefix = str_repeat(">", $this->invokeDepth);
$this->output->writeln("<comment>$prefix $command_name</comment>");
$returnCode = $command->run($input, $this->output());
// $this->output->writeln("");.

return $returnCode;
}

Expand Down
Loading

0 comments on commit 1c13c60

Please sign in to comment.