Skip to content

Commit

Permalink
Merge pull request #25 from KILTprotocol/bugfix/fix_version_parsing_i…
Browse files Browse the repository at this point in the history
…n_buildspec

fix: version parsing in Cargo.toml
  • Loading branch information
foby authored Apr 10, 2019
2 parents b0933f4 + 27cb462 commit 1529b34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion buildspec-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ phases:
- aws --version
- $(aws ecr get-login --region eu-central-1 --no-include-email)
- REPOSITORY_URI=348099934012.dkr.ecr.eu-central-1.amazonaws.com/kilt/prototype-chain
- 'IMAGE_TAG=$(sed -n ''s/version = "\(.*\)"$/\1/p'' Cargo.toml)'
- IMAGE_TAG=$(cat Cargo.toml | grep version | head -1 | sed 's/[",]//g' | cut -d "=" -f2 | tr -d '[[:space:]]')
- docker pull $REPOSITORY_URI:latest || true
build:
commands:
- echo Run 'build / test'
- echo "REPOSITORY_URI=$REPOSITORY_URI"
- echo "IMAGE_TAG=$IMAGE_TAG"
- docker build --cache-from $REPOSITORY_URI:latest -t $REPOSITORY_URI:$IMAGE_TAG .
- echo 'build / test' successful!
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ phases:
- aws --version
- $(aws ecr get-login --region eu-central-1 --no-include-email)
- REPOSITORY_URI=348099934012.dkr.ecr.eu-central-1.amazonaws.com/kilt/prototype-chain
- 'IMAGE_TAG=$(sed -n ''s/version = "\(.*\)"$/\1/p'' Cargo.toml)'
- IMAGE_TAG=$(cat Cargo.toml | grep version | head -1 | sed 's/[",]//g' | cut -d "=" -f2 | tr -d '[[:space:]]')
- docker pull $REPOSITORY_URI:latest || true
build:
commands:
Expand Down

0 comments on commit 1529b34

Please sign in to comment.