Skip to content

Commit e527932

Browse files
authored
fix(environments): fix environments pull on CI (#2512)
* POC run against guides * Try bash instead of sh * Add debug line * Use printf instead of echo * Add more comments * Update import path in guides * Adjust comments * Adjust comment * Remove extraneous comments * More comments adjustment * Revert "POC run against guides" This reverts commit 88bceca.
1 parent d28ac1f commit e527932

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

environments/pull-environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e
33
IFS='|'
44

environments/pull-environments.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#!/bin/sh
1+
#!/bin/bash
2+
# using bin/bash for macOS and Linux compatibility
23
set -e
34
IFS='|'
45

@@ -30,5 +31,7 @@ fi
3031
# source: https://stackoverflow.com/a/24112741
3132
shell_path="$(dirname "${BASH_SOURCE[0]}")" # under normal use, this points to `../`
3233

33-
echo $dirs | xargs -P $numParallelTasks -I {} sh -c ""$shell_path"/pull-environment.sh {}"
34+
# Pull environments in parallel
35+
# Note that printf is used because echo dosn't handle `\n` by default in bash.
36+
printf $dirs | xargs -P $numParallelTasks -I {} sh -c ""$shell_path"/pull-environment.sh {}";
3437

guides/react/protected-routes/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Amplify } from 'aws-amplify';
88
* Update this import to match the path to your aws-exports.js file:
99
* import aws_exports from "./aws-exports";
1010
*/
11-
import aws_exports from '../../../../environments/auth-with-email/src/aws-exports.js';
11+
import aws_exports from '../../../../environments/auth/auth-with-email/src/aws-exports';
1212

1313
import './index.css';
1414

0 commit comments

Comments
 (0)