Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from decidim/gmarpons-improvements
Browse files Browse the repository at this point in the history
Travis script: auto-increment release number in every deploy
  • Loading branch information
gmarpons authored May 20, 2019
2 parents 603fd16 + 37b0339 commit d120f0f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
distribution: xenial
language: node_js
node_js:
- "10"
before_script:
- npm install -g gulp-cli
script: gulp pack
script:
- gulp pack
before_deploy:
# Following line creates a tag name "v0" if no "v*" tag exist, or a tag "vN+1" if the largest version tag is "vN"
- ({ echo v0 ; git tag -l v* --sort=v:refname ; }) | cat
- export TRAVIS_TAG="v$(echo "$({ echo v0 ; git tag -l v* --sort=v:refname ; } | tail -n 1 | tr -d v) + 1" | bc)"
- echo "TRAVIS_TAG"=$TRAVIS_TAG
deploy:
provider: releases
api_key: $GITHUB_API_KEY
api_key: $GITHUB_TOKEN
file:
- build/ui-bundle.zip
skip_cleanup: true
on:
repo: $TRAVIS_REPO_SLUG
tags: true
overwrite: true
overwrite: false
after_deploy:
- git config --local user.name $(git log -1 --pretty=format:'%cn')
- git config --local user.email $(git log -1 --pretty=format:'%ce')
- git tag $TRAVIS_TAG

0 comments on commit d120f0f

Please sign in to comment.