Skip to content

Commit

Permalink
Add ./redmine dist and auto-release to GH
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraichen committed Mar 15, 2015
1 parent 818119d commit 09f9daf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
sudo: false
language: ruby
cache:
Expand All @@ -17,22 +16,34 @@ 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"
- ./redmine update
- 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
11 changes: 11 additions & 0 deletions redmine
Original file line number Diff line number Diff line change
Expand Up @@ -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;;
Expand All @@ -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
Expand Down

0 comments on commit 09f9daf

Please sign in to comment.