version: 0.2

phases:
  install:
    runtime-versions:
      python: 3.7
    commands:
      - echo Entered the install phase...
      - echo About to build $RESOURCE_PATH
      - export PATH="/usr/local/bin:$PATH"
      - pip install git+https://github.com/aws-cloudformation/cloudformation-cli.git@master
      - pip install git+https://github.com/aws-cloudformation/cloudformation-cli-python-plugin.git@master
      - /usr/local/bin/dockerd-entrypoint.sh
      - cat /var/log/docker.log
      - ENTRY_PATH=$(python scripts/entry.py $RESOURCE_PATH/.rpdk-config)
      - echo ENTRY_PATH is $ENTRY_PATH
      - TYPE_NAME=$(python scripts/type_name.py $RESOURCE_PATH/.rpdk-config)
      - echo TYPE_NAME is $TYPE_NAME
      - cd $RESOURCE_PATH
      - pwd
      - ls
      - aws --version
  build:
    commands:
      - echo Entered the build phase...
      - ls -l ../../release
      - ../../release/publish-regions.sh
    finally:
      - cat rpdk.log