From 2559485e638cbde39acd538e6a111aaf1ba81be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Treer=20Zolt=C3=A1n?= Date: Wed, 24 Apr 2019 13:22:54 +0200 Subject: [PATCH 1/4] fix yarn not passing arguments properly to docker task --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c178a42a..b1b8572d 100644 --- a/package.json +++ b/package.json @@ -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", From 11bd0737a44d5217049f3bf5095c1445c71a9051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Treer=20Zolt=C3=A1n?= Date: Wed, 24 Apr 2019 13:27:34 +0200 Subject: [PATCH 2/4] add indentation to bash snippets in travis yml --- .travis.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index efc51508..fca8e99d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -32,22 +32,22 @@ 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 + 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 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 From 9f16170d05b14872b8f60f0fc89da0456601ec41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Treer=20Zolt=C3=A1n?= Date: Wed, 24 Apr 2019 13:46:08 +0200 Subject: [PATCH 3/4] improve tagging logic (only tag with latest if branch is master) --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fca8e99d..84b21382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,9 @@ after_success: 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 + if [ $TRAVIS_BRANCH == "master" ]; then + yarn docker:tag:latest; + fi docker push augmint/contracts ; fi fi From 18340807e2d552eeac397201feb3414a91ea88b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Treer=20Zolt=C3=A1n?= Date: Wed, 24 Apr 2019 13:51:19 +0200 Subject: [PATCH 4/4] version number in package json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1b8572d..aa277ab4 100644 --- a/package.json +++ b/package.json @@ -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",