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

travis config fixes #207

Merged
merged 4 commits into from
Apr 24, 2019
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
32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ before_install:
install:
- |
if [[ $BRANCH == "greenkeeper/"* ]]; then
echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install;
echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install;
else
echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile;
echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile;
fi
before_script:
- greenkeeper-lockfile-update
Expand All @@ -32,22 +32,24 @@ after_success:
- echo after_success TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST TRAVIS_TAG=$TRAVIS_TAG TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER TRAVIS_COMMIT=$TRAVIS_COMMIT ;
- |
if [ $TRAVIS_PULL_REQUEST == "false" ]; then
if [ $TRAVIS_BRANCH == "master" ] || [[ $TRAVIS_TAG =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
if [ ! -z $TRAVIS_TAG ]; then
yarn docker:tag:version $TRAVIS_TAG;
fi
yarn docker:tag:latest; # NB: it will tag old version with latest if you tag an old commit on master
docker push augmint/contracts ;
fi
if [ $TRAVIS_BRANCH == "master" ] || [[ $TRAVIS_TAG =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
if [ ! -z $TRAVIS_TAG ]; then
yarn docker:tag:version $TRAVIS_TAG;
fi
if [ $TRAVIS_BRANCH == "master" ]; then
yarn docker:tag:latest;
fi
docker push augmint/contracts ;
fi
fi
- |
if [ "$TRAVIS_BRANCH" == "staging" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
yarn docker:tag:staging ;
docker push augmint/contracts ;
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
yarn docker:tag:staging ;
docker push augmint/contracts ;
fi
after_failure:
- wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "augmint-contracts",
"version": "1.0.7",
"version": "1.0.9",
"description": "Augmint Stable Tokens - Solidity contracts",
"author": "“Augmint”",
"homepage": "https://github.com/Augmint/augmint-contracts#readme",
Expand Down Expand Up @@ -44,7 +44,7 @@
"docker:tag:build": "docker tag localdockerimage augmint/contracts:commit-$(git log -1 --format='%h'); docker tag localdockerimage augmint/contracts:build-$TRAVIS_BUILD_NUMBER",
"docker:tag:staging": "docker tag localdockerimage augmint/contracts:staging;",
"docker:tag:latest": "docker tag localdockerimage augmint/contracts:latest",
"docker:tag:version": "docker tag localdockerimage augmint/contracts:$1"
"docker:tag:version": "func () { docker tag localdockerimage augmint/contracts:${1}; }; func"
},
"devDependencies": {
"abiniser": "0.5.1",
Expand Down