diff --git a/.travis.yml b/.travis.yml index 4464e374..618b8136 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ ---- sudo: false language: ruby cache: @@ -17,17 +16,17 @@ env: - REDMINE_VERSION=master matrix: allow_failures: - - env: REDMINE_VERSION=master + - env: REDMINE_VERSION=master exclude: - - env: REDMINE_VERSION=2.6.2 - rvm: '2.2' - - env: REDMINE_VERSION=2.5.3 - rvm: '2.2' - - env: REDMINE_VERSION=2.4.7 - rvm: '2.2' + - env: REDMINE_VERSION=2.6.2 + rvm: '2.2' + - env: REDMINE_VERSION=2.5.3 + rvm: '2.2' + - env: REDMINE_VERSION=2.4.7 + rvm: '2.2' branches: except: - - debian + - debian install: - export BUNDLE_GEMFILE="" - export BUNDLE_PATH="$(pwd)/vendor/bundle" @@ -35,4 +34,16 @@ install: - bundle install --jobs=3 --retry=3 --path $BUNDLE_PATH script: - bundle exec rake spec - +before_deploy: +- ./redmine dist +deploy: + provider: releases + api_key: + secure: YFt/c/LIANdzODnozIHNj3JXFxho+6adndlyWwKe5JwynrMmYO8+i5d3aFtNFeafxwktoOqYQHoZ66w1XZTay2cG5uYaL1b4n5BsWfuhJpa0CE1SwJxyzh4v50L3ZBcv1Udh+Bl07a15AM1qP60Rq5PHtSorC6ZNFGchS6YuNIQ= + file_glob: true + file: + - "dist/*.zip" + - "dist/*.tar.gz" + on: + repo: jgraichen/redmine_dashboard + branch: stable-v2 diff --git a/redmine b/redmine index 3b43b5fb..ce27a2b5 100755 --- a/redmine +++ b/redmine @@ -124,6 +124,16 @@ function testlog echo } +function dist +{ + TAG=$1 + [ -z "${TAG}" ] && TAG=`git tag | tail -n1` + mkdir -p dist + set -x + git archive --prefix redmine_dashboard/ --output "dist/redmine_dashboard-${TAG}.tar.gz" "${TAG}" + git archive --prefix redmine_dashboard/ --output "dist/redmine_dashboard-${TAG}.zip" "${TAG}" +} + case "$1" in install) shift; install $@; exit 0;; update) shift; update $@; exit 0;; @@ -132,6 +142,7 @@ case "$1" in cleanup) shift; cleanup $@; exit 0;; testlog) shift; testlog $@; exit 0;; exec) shift; do_exec $@; exit 0;; + dist) shift; dist $@; exit 0;; *) echo "Unknown action: $@" exit 1