-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into issue-1788
- Loading branch information
Showing
5 changed files
with
45 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -50,7 +50,7 @@ protected function configure(): void | |
->addOption('no-push', null, InputOption::VALUE_NONE, 'Do not push changes to Acquia Cloud') | ||
->addOption('no-commit', null, InputOption::VALUE_NONE, 'Do not commit changes. Implies no-push') | ||
->addOption('no-clone', null, InputOption::VALUE_NONE, 'Do not clone repository. Implies no-commit and no-push') | ||
->addOption('destination-git-urls', 'u', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The URL(s) of your git repository to which the artifact branch will be pushed') | ||
->addOption('destination-git-urls', 'u', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The URL of your git repository to which the artifact branch will be pushed. Use multiple times for multiple URLs.') | ||
->addOption('destination-git-branch', 'b', InputOption::VALUE_REQUIRED, 'The destination branch to push the artifact to') | ||
->addOption('destination-git-tag', 't', InputOption::VALUE_REQUIRED, 'The destination tag to push the artifact to. Using this option requires also using the --source-git-tag option') | ||
->addOption('source-git-tag', 's', InputOption::VALUE_REQUIRED, 'The source tag from which to create the tag artifact') | ||
|
@@ -60,7 +60,6 @@ protected function configure(): void | |
. 'To run additional build or sanitization steps (e.g. <options=bold>npm install</>), add a <options=bold>post-install-cmd</> script to your <options=bold>composer.json</> file: https://getcomposer.org/doc/articles/scripts.md#command-events') | ||
->addUsage('--destination-git-branch=main-build') | ||
->addUsage('--source-git-tag=foo-build --destination-git-tag=1.0.0') | ||
->addUsage('[email protected]:example.git --destination-git-branch=main-build') | ||
->addUsage('[email protected]:example.git [email protected]:example.git --destination-git-branch=main-build'); | ||
} | ||
|
||
|
@@ -95,8 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
$destinationGitUrls = []; | ||
$destinationGitRef = ''; | ||
if (!$input->getOption('no-clone')) { | ||
$applicationUuid = $this->determineCloudApplication(); | ||
$destinationGitUrls = $this->determineDestinationGitUrls($applicationUuid); | ||
$destinationGitUrls = $this->determineDestinationGitUrls(); | ||
$destinationGitRef = $this->determineDestinationGitRef(); | ||
$sourceGitBranch = $this->determineSourceGitRef(); | ||
$destinationGitUrlsString = implode(',', $destinationGitUrls); | ||
|
@@ -153,7 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int | |
/** | ||
* @return string[] | ||
*/ | ||
private function determineDestinationGitUrls(?string $applicationUuid): array | ||
private function determineDestinationGitUrls(): array | ||
{ | ||
if ($this->input->getOption('destination-git-urls')) { | ||
return $this->input->getOption('destination-git-urls'); | ||
|
@@ -165,6 +163,7 @@ private function determineDestinationGitUrls(?string $applicationUuid): array | |
return $this->datastoreAcli->get('push.artifact.destination_git_urls'); | ||
} | ||
|
||
$applicationUuid = $this->determineCloudApplication(); | ||
return [$this->getAnyVcsUrl($applicationUuid)]; | ||
} | ||
|
||
|
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
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