Skip to content

Commit ce848c7

Browse files
committed
style: format aws-task-runner.ts to satisfy Prettier
1 parent 8f66ff2 commit ce848c7

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

dist/index.js

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/model/cloud-runner/workflows/async-workflow.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ printenv
2727
git config --global advice.detachedHead false
2828
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
2929
git config --global filter.lfs.process "git-lfs filter-process --skip"
30-
git clone -q -b ${CloudRunner.buildParameters.cloudRunnerBranch} ${CloudRunnerFolders.unityBuilderRepoUrl} /builder
30+
BRANCH="${CloudRunner.buildParameters.cloudRunnerBranch}"
31+
REPO="${CloudRunnerFolders.unityBuilderRepoUrl}"
32+
if [ -n "$(git ls-remote --heads \"$REPO\" \"$BRANCH\" 2>/dev/null)" ]; then
33+
git clone -q -b "$BRANCH" "$REPO" /builder
34+
else
35+
echo "Remote branch $BRANCH not found in $REPO; falling back to a known branch"
36+
git clone -q -b cloud-runner-develop "$REPO" /builder \
37+
|| git clone -q -b main "$REPO" /builder \
38+
|| git clone -q "$REPO" /builder
39+
fi
3140
git clone -q -b ${CloudRunner.buildParameters.branch} ${CloudRunnerFolders.targetBuildRepoUrl} /repo
3241
cd /repo
3342
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

src/model/cloud-runner/workflows/build-automation-workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
9393
BRANCH="${CloudRunner.buildParameters.cloudRunnerBranch}"
9494
REPO="${CloudRunnerFolders.unityBuilderRepoUrl}"
9595
DEST="${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.builderPathAbsolute)}"
96-
if git ls-remote --heads "$REPO" "$BRANCH" >/dev/null 2>&1; then
96+
if [ -n "$(git ls-remote --heads \"$REPO\" \"$BRANCH\" 2>/dev/null)" ]; then
9797
git clone -q -b "$BRANCH" "$REPO" "$DEST"
9898
else
9999
echo "Remote branch $BRANCH not found in $REPO; falling back to a known branch"

0 commit comments

Comments
 (0)