Skip to content

Commit

Permalink
Further work on translations
Browse files Browse the repository at this point in the history
  • Loading branch information
bomoko committed Aug 29, 2023
1 parent 1a8a492 commit fd9e3b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function run(
]
) {

// Bootstrap the environment
\Migrator\Step\StepParent::fillDynamicEnvironmentFromEnv();

\Migrator\LagoonUtilityBelt::setUpLagoon_yml();
$climate = new CLImate;
$opts = array_merge($opts, $this->processEnvironment());
Expand Down
2 changes: 1 addition & 1 deletion src/Step/Deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function runImplementation(array $args)
) ? $args["passIfTextExistsInLogs"] : null;

// We'd like to run the buildvar values through the text substitutions
$processedBuildVars = array_map(fn($v) => $this->doTextSubstitutions($v), $args['buildVariables'] ?: []);
$processedBuildVars = array_map(fn($v) => ["name" => $v["name"], "value" => $this->doTextSubstitutions($v['value'])], $args['buildVariables'] ?: []);
$variables = !empty($processedBuildVars) ? $processedBuildVars : null;
$bulkName = !empty($args['bulkName']) ? $args['bulkName'] : null;
$skipDeploymentWait = !empty($args['skipDeploymentWait']) ? $args['skipDeploymentWait'] : false;
Expand Down
10 changes: 9 additions & 1 deletion src/Step/Setdeploytarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ public function runImplementation(array $args)
if(empty($args['target'])) {
throw new \Exception("Step type setdeploytarget requires an argument 'target'");
}

// Do substitutions on Target
$target = self::doTextSubstitutions($args['target']);
if(!is_numeric($target)) {
throw new \Exception(sprintf("The target specified is not numeric: %s", $target));
}
$targetInt = intval($target);

$this->log("Setting deploy target to {$args['target']}");
$this->utilityBelt->setDeployTargetForEnvironment($this->args->project, $this->args->environment, $args['target']);
$this->utilityBelt->setDeployTargetForEnvironment($this->args->project, $this->args->environment, $targetInt);
}

}

0 comments on commit fd9e3b1

Please sign in to comment.