From dfdfc6f8b928f764db69055e1535dcc8accd0e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Antu=C3=B1a?= Date: Wed, 16 Jan 2019 01:56:51 +0100 Subject: [PATCH] add last fixes --- scripts/.travis.yml | 16 ++++++++++------ scripts/before_deploy.sh | 11 ++++------- scripts/before_deploy_no_publish.sh | 12 ++++-------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/scripts/.travis.yml b/scripts/.travis.yml index 2834c21..729d8a6 100644 --- a/scripts/.travis.yml +++ b/scripts/.travis.yml @@ -4,16 +4,16 @@ sudo: required stages: - name: build-test - if: tag !~ ^release*$" + if: tag != "release" - name: release - if: tag =~ ^release*$" + if: tag = "release" jobs: include: # Test that it builds correctly ############################### - stage: build-test - if: env(TRAVIS_TAG) != master + name: build-test services: - docker script: @@ -23,12 +23,16 @@ jobs: # - code below is common between DAppNode packages ################################################## - stage: release + name: release services: - docker - script: skip + script: + - npm install -g @dappnode/dappnodesdk + - docker-compose build + - dappnodesdk publish patch -p infura node_js: lts/* before_deploy: - - wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/before_deploy.sh + - wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/before_deploy_no_publish.sh - source before_deploy.sh deploy: provider: releases @@ -47,4 +51,4 @@ jobs: condition: "$TRAVIS_TAG =~ ^release*$" after_deploy: - wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/after_deploy.sh - - source after_deploy.sh + - source after_deploy.sh \ No newline at end of file diff --git a/scripts/before_deploy.sh b/scripts/before_deploy.sh index dbd70a3..20e25b4 100644 --- a/scripts/before_deploy.sh +++ b/scripts/before_deploy.sh @@ -39,17 +39,14 @@ export RELEASE_VERSION=$(dappnodesdk next patch -p infura) export TRAVIS_TAG="v${RELEASE_VERSION}" echo "NEXT TRAVIS_TAG $TRAVIS_TAG" -# 6. Generate the release files running the dappnodesdk -dappnodesdk publish patch -p infura - -# 7. Tag release with the correct version -# (7.) Check if the tag exists, if so delete it. Fail safe, catch errors with || +# 6. Tag release with the correct version +# (6.) Check if the tag exists, if so delete it. Fail safe, catch errors with || if [ $(git tag -l "$TRAVIS_TAG") ]; then export DELETE_TAG=true ; fi if [ $DELETE_TAG ]; then git push --delete origin $TRAVIS_TAG || echo "Error deleting tag $TRAVIS_TAG from origin" ; fi if [ $DELETE_TAG ]; then git tag --delete $TRAVIS_TAG || echo "Error deleting tag $TRAVIS_TAG locally" ; fi -# (7.) Tag this commit +# (6.) Tag this commit git tag $TRAVIS_TAG -# (7.) Return to master. +# (6.) Return to master. # When travis is triggered by a tag this error happens: # > error: pathspec 'master' did not match any file(s) known to git. # A `git fetch` will be run to ensure that the master branch is present diff --git a/scripts/before_deploy_no_publish.sh b/scripts/before_deploy_no_publish.sh index 6ca63de..20e25b4 100644 --- a/scripts/before_deploy_no_publish.sh +++ b/scripts/before_deploy_no_publish.sh @@ -39,18 +39,14 @@ export RELEASE_VERSION=$(dappnodesdk next patch -p infura) export TRAVIS_TAG="v${RELEASE_VERSION}" echo "NEXT TRAVIS_TAG $TRAVIS_TAG" -# 6. Generate the release files running the dappnodesdk -# The DNP_ETHCHAIN takes > 60 min to build. This command triggers a timeout and should be run directly from the travis yml to prevent it. -# dappnodesdk publish patch -p infura - -# 7. Tag release with the correct version -# (7.) Check if the tag exists, if so delete it. Fail safe, catch errors with || +# 6. Tag release with the correct version +# (6.) Check if the tag exists, if so delete it. Fail safe, catch errors with || if [ $(git tag -l "$TRAVIS_TAG") ]; then export DELETE_TAG=true ; fi if [ $DELETE_TAG ]; then git push --delete origin $TRAVIS_TAG || echo "Error deleting tag $TRAVIS_TAG from origin" ; fi if [ $DELETE_TAG ]; then git tag --delete $TRAVIS_TAG || echo "Error deleting tag $TRAVIS_TAG locally" ; fi -# (7.) Tag this commit +# (6.) Tag this commit git tag $TRAVIS_TAG -# (7.) Return to master. +# (6.) Return to master. # When travis is triggered by a tag this error happens: # > error: pathspec 'master' did not match any file(s) known to git. # A `git fetch` will be run to ensure that the master branch is present