File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed
amplify_datastore/example/tool
auth/amplify_auth_cognito/example/tool Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 2
2
set -e
3
3
IFS=' |'
4
4
5
+ profileName=${AWS_PROFILE:- default}
6
+
5
7
FLUTTERCONFIG=" {\
6
8
\" ResDir\" :\" ./lib/\" ,\
7
9
}"
@@ -17,6 +19,17 @@ FRONTEND="{\
17
19
\" config\" :$FLUTTERCONFIG \
18
20
}"
19
21
22
+ AWSCLOUDFORMATIONCONFIG=" {\
23
+ \" configLevel\" :\" project\" ,\
24
+ \" useProfile\" :\" true\" ,\
25
+ \" profileName\" :\" $profileName \" ,\
26
+ \" region\" :\" us-west-2\"\
27
+ }"
28
+
29
+ PROVIDERS=" {\
30
+ \" awscloudformation\" :$AWSCLOUDFORMATIONCONFIG \
31
+ }"
32
+
20
33
# read the request template and the schema
21
34
requestTemplate=` cat tool/add_api_request.json`
22
35
schema=` cat tool/schema.graphql`
@@ -31,6 +44,7 @@ request="${requestTemplate/<SCHEMA_PLACEHOLDER>/$schema}"
31
44
amplify init \
32
45
--amplify $AMPLIFY \
33
46
--frontend $FRONTEND \
47
+ --providers $PROVIDERS \
34
48
--yes
35
49
echo " $request " | jq -c | amplify add api --headless
36
50
amplify push --yes
Original file line number Diff line number Diff line change 2
2
set -e
3
3
IFS=' |'
4
4
5
+ profileName=${AWS_PROFILE:- default}
6
+
5
7
FLUTTERCONFIG=" {\
6
8
\" ResDir\" :\" ./lib/\" ,\
7
9
}"
@@ -17,6 +19,17 @@ FRONTEND="{\
17
19
\" config\" :$FLUTTERCONFIG \
18
20
}"
19
21
22
+ AWSCLOUDFORMATIONCONFIG=" {\
23
+ \" configLevel\" :\" project\" ,\
24
+ \" useProfile\" :\" true\" ,\
25
+ \" profileName\" :\" $profileName \" ,\
26
+ \" region\" :\" us-west-2\"\
27
+ }"
28
+
29
+ PROVIDERS=" {\
30
+ \" awscloudformation\" :$AWSCLOUDFORMATIONCONFIG \
31
+ }"
32
+
20
33
# read the request template and the schema
21
34
requestTemplate=` cat tool/add_api_request.json`
22
35
schema=` cat tool/schema.graphql`
@@ -31,6 +44,7 @@ request="${requestTemplate/<SCHEMA_PLACEHOLDER>/$schema}"
31
44
amplify init \
32
45
--amplify $AMPLIFY \
33
46
--frontend $FRONTEND \
47
+ --providers $PROVIDERS \
34
48
--yes
35
49
echo " $request " | jq -c | amplify add api --headless
36
50
amplify push --yes
Original file line number Diff line number Diff line change 2
2
set -e
3
3
IFS=' |'
4
4
5
- [ " $AWS_PROFILE " ] && profileName=" $ AWS_PROFILE" || profileName= " default" ;
5
+ profileName=${ AWS_PROFILE:- default}
6
6
7
7
FLUTTERCONFIG=" {\
8
8
\" ResDir\" :\" ./lib/\" ,\
@@ -21,7 +21,7 @@ FRONTEND="{\
21
21
22
22
AWSCLOUDFORMATIONCONFIG=" {\
23
23
\" configLevel\" :\" project\" ,\
24
- \" useProfile\" :" true" ,\
24
+ \" useProfile\" :\ " true\ " ,\
25
25
\" profileName\" :\" $profileName \" ,\
26
26
\" region\" :\" us-west-2\"\
27
27
}"
You can’t perform that action at this time.
0 commit comments