Skip to content

Commit

Permalink
fix(tools): change the tools script to comply with amplify-app changes (
Browse files Browse the repository at this point in the history
  • Loading branch information
drochetti authored May 14, 2020
1 parent 13be092 commit 67412ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions AmplifyTools/amplify-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export PATH=$PATH:$(npm bin -g)
if ! which node >/dev/null; then
echo "warning: Node is not installed. Vist https://nodejs.org/en/download/ to install it"
exit 1
elif ! test -f ./amplifyxc.config; then
elif ! test -f ./amplifytools.xcconfig; then
npx amplify-app --platform ios
fi

. amplifyxc.config
. amplifytools.xcconfig
amplifyPush=$push
amplifyModelgen=$modelgen
amplifyProfile=$profile
Expand All @@ -25,7 +25,10 @@ amplifyRegion=$region
amplifyEnvName=$envName

if $amplifyModelgen; then
echo "modelgen is set to true, generating Swift models from schema.graphql..."
amplify codegen model
# calls amplify-app again so the Xcode project is updated with the generated models
amplify-app --platform ios
fi

if [ -z "$amplifyAccessKey" ] || [ -z "$amplifySecretKey" ] || [ -z "$amplifyRegion" ]; then
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ DEPENDENCIES:
- SwiftLint

SPEC REPOS:
trunk:
https://cdn.cocoapods.org/:
- AWSAuthCore
- AWSCognitoIdentityProvider
- AWSCognitoIdentityProviderASF
Expand Down
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 67412ca

Please sign in to comment.