Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tools): change the tools script to comply with amplify-app changes #445

Merged
merged 2 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not familiar with this syntax, i would have expected to check if amplifyModelgen is not set by using:

if [[ ! -z $amplifyModelgen ]]; then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar either tbh

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
wooj2 marked this conversation as resolved.
Show resolved Hide resolved
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/:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@palpatim is this expected/correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

- 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.