2 "name": "amplify-tools",
4 "summary": "Installs Amplify CLI",
5 "description": "Creates an amplify project in your next build. Generate models by setting modelgen in amplifyxc.config to true and running the build. Push your resources to the cloud by setting amplifyPush in amplifyxc.config to true and running the build.",
6 "homepage": "https://github.com/aws-amplify/amplify-cli",
12 "Amplify CLI": "amplify-cli@amazon.com"
15 "git": "https://github.com/nikhname/amplify-tools-spec.git",
21 "swift_versions": "4.0",
22 "source_files": "Classes/*",
25 "script": "set -e\nexport PATH=$PATH:`npm bin -g`\n\ncd ..\nif ! which node > /dev/null; then\n echo \"warning: Node is not installed. Vist https://nodejs.org/en/download/ to install it\"\nelif [ ! -f ./amplifyxc.config ]; then\n if ! which amplify-app > /dev/null; then \n npm install -g amplify-app\n sleep 1\n amplify-app --platform ios --path $PWD\n else \n amplify-app --platfrom ios --path $PWD \n fi\nfi\n\n. amplifyxc.config\namplifyPush=$push\namplifyModelgen=$modelgen\namplifyProfile=$profile\namplifyAccessKey=$accessKeyId\namplifySecretKey=$secretAccessKey\namplifyRegion=$region\namplifyEnvName=$envName\n\nif $amplifyModelgen; then \n amplify codegen model\nfi\n\nif [ -z \"$amplifyAccessKey\" ] || [ -z \"$amplifySecretKey\" ] || [ -z \"$amplifyRegion\" ]; then\nAWSCLOUDFORMATIONCONFIG=\"{\\\n\\\"configLevel\\\":\\\"project\\\",\\\n\\\"useProfile\\\":true,\\\n\\\"profileName\\\":\\\"${amplifyProfile}\\\"\\\n}\"\nelse \nAWSCLOUDFORMATIONCONFIG=\"{\\\n\\\"configLevel\\\":\\\"project\\\",\\\n\\\"useProfile\\\":true,\\\n\\\"profileName\\\":\\\"${amplifyProfile}\\\",\\\n\\\"accessKeyId\\\":\\\"${amplifyAccessKeyId}\\\",\\\n\\\"secretAccessKey\\\":\\\"${amplifySecretAccessKey}\\\",\\\n\\\"region\\\":\\\"${amplifyRegion}\\\"\\\n}\"\nfi\n\nif [ -z \"$amplifyEnvName\" ]; then \nAMPLIFY=\"{\\\n\\\"envName\\\":\\\"amplify\\\"\\\n}\"\nelse\nAMPLIFY=\"{\\\n\\\"envName\\\":\\\"${amplifyEnvName}\\\"\\\n}\"\nfi\n\nPROVIDERS=\"{\\\n\\\"awscloudformation\\\":$AWSCLOUDFORMATIONCONFIG\\\n}\"\n\nif $amplifyPush; then\n if test -f ./amplify/.config/local-env-info.json; then\n amplify push --yes\n else \n amplify init --amplify $AMPLIFY --providers $PROVIDERS --yes\n fi\nfi",
26 "execution_position": "before_compile"
28 "swift_version": "4.0"