Skip to content

Commit

Permalink
remove redundant amplify configure
Browse files Browse the repository at this point in the history
  • Loading branch information
ambientlight committed Nov 28, 2019
1 parent 95b41c6 commit 86d8412
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 55 deletions.
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,27 +199,6 @@ Use custom amplify version instead of latest stable (npm's `@latest`) when param

the root amplify project directory (contains `/amplify`): use it if you amplify project is not this repo root directory.

### source_dir
**type**: `string`
**required**: `NO`
**default**: **src**

front-end source location where `aws_exports.js` will be generated

### distribution_dir
**type**: `string`
**required**: `NO`
**default**: **dist**

front-end artifacts deployment directory that gets uploaded to S3 during amplify publish if hosting category is used in the project

### build_command
**type**: `string`
**required**: `NO`
**default**: `npm run build`

a build command to run with amplify publish (to build front-end deployment artifacts)

### delete_lock
**type**: `bool`
**required** `YES` for `delete_env` amplify_command
Expand Down
35 changes: 1 addition & 34 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,42 +59,9 @@ case $5 in
;;

configure)
FRONTENDCONFIG="{\
\"SourceDir\":\"$2\",\
\"DistributionDir\":\"$3\",\
\"BuildCommand\":\"$4\",\
\"StartCommand\":\"npm run-script start\"\
}"

AWSCLOUDFORMATIONCONFIG="{\
\"configLevel\":\"project\",\
\"useProfile\":false,\
\"accessKeyId\":\"$AWS_ACCESS_KEY_ID\",\
\"secretAccessKey\":\"$AWS_SECRET_ACCESS_KEY\",\
\"region\":\"$AWS_REGION\"\
}"

AMPLIFY="{\
\"projectName\":\"github actions CI\",\
\"defaultEditor\":\"code\"\
}"

FRONTEND="{\
\"frontend\":\"javascript\",\
\"framework\":\"none\",\
\"config\":$FRONTENDCONFIG\
}"

PROVIDERS="{\
\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG\
}"

# this is required in addition to configure project for env to work
echo '{"projectPath": "'"$(pwd)"'","defaultEditor":"code","envName":"'$6'"}' > ./amplify/.config/local-env-info.json

amplify configure project --amplify "$AMPLIFY" --frontend "$FRONTEND" --providers "$PROVIDERS" --yes

# if environment doesn't exist create a new one
# if environment doesn't exist fail explicitly
if [ -z "$(amplify env get --name $6 | grep 'No environment found')" ] ; then
echo "found existing environment $6"
amplify env pull --yes
Expand Down

0 comments on commit 86d8412

Please sign in to comment.