Skip to content

Commit

Permalink
Add check for version files existing
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStainsby committed Feb 29, 2024
1 parent 33d7818 commit 04e7f93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ phases:
install:
commands:
- cd $CODEBUILD_SRC_DIR
- if [ ! -f .copilot-version ]; then
echo "Cannot find .copilot-version file"
exit 1
fi
- if [ ! -f .copilot-helper-version ]; then
echo "Cannot find .copilot-helper-version file"
exit 1
fi
- COPILOT_VERSION=`cat .copilot-version`
- COPILOT_HELPER_VERSION=`cat .copilot-helper-version`
- mkdir ./build-tools
- cd ./build-tools
# Install copilot
- wget -q "https://ecs-cli-v2-release.s3.amazonaws.com/copilot-linux-v${COPILOT_VERSION}"
- mv "./copilot-linux-v${COPILOT_VERSION}" ./copilot
- chmod +x ./copilot
# Install pyyaml and dbt-copilot-tools
- COPILOT_HELPER_VERSION=`cat .copilot-helper-version`
- pip install PyYAML dbt-copilot-tools==$COPILOT_HELPER_VERSION
# Install dyff - yaml differ
- wget -q "https://github.com/homeport/dyff/releases/download/v${DYFF_VERSION}/dyff_${DYFF_VERSION}_linux_amd64.tar.gz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ phases:
install:
commands:
- cd $CODEBUILD_SRC_DIR
- if [ ! -f .copilot-version ]; then
echo "Cannot find .copilot-version file"
exit 1
fi
- if [ ! -f .copilot-helper-version ]; then
echo "Cannot find .copilot-helper-version file"
exit 1
fi
- COPILOT_VERSION=`cat .copilot-version`
- COPILOT_HELPER_VERSION=`cat .copilot-helper-version`
- mkdir ./build-tools
- cd ./build-tools
# Install copilot
- wget -q "https://ecs-cli-v2-release.s3.amazonaws.com/copilot-linux-v${COPILOT_VERSION}"
- mv "./copilot-linux-v${COPILOT_VERSION}" ./copilot
- chmod +x ./copilot
# Install pyyaml and dbt-copilot-tools
- COPILOT_HELPER_VERSION=`cat .copilot-helper-version`
- pip install PyYAML dbt-copilot-tools==$COPILOT_HELPER_VERSION
# Install dyff - yaml differ
- wget -q "https://github.com/homeport/dyff/releases/download/v${DYFF_VERSION}/dyff_${DYFF_VERSION}_linux_amd64.tar.gz"
Expand Down

0 comments on commit 04e7f93

Please sign in to comment.