Skip to content

Commit dfb7659

Browse files
Release new rugged versions via travis.
1 parent 295900c commit dfb7659

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

.travis.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# Travis-CI Build for rugged
2-
# see travis-ci.org for details
3-
41
language: ruby
52

63
os:
74
- linux
85
- osx
96

10-
# Ruby versions to test against
117
rvm:
128
- 1.9.3
139
- 2.0.0
@@ -36,3 +32,24 @@ before_install:
3632
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./vendor/libgit2/script/install-deps-osx.sh; fi
3733

3834
script: script/travisbuild
35+
36+
before_deploy:
37+
- echo "module Rugged" > lib/rugged/version.rb
38+
- if [ ! -z "$TRAVIS_TAG" ]; then
39+
- echo " Version = VERSION = \"$(echo "$TRAVIS_TAG" | tail -c +2)\"" >> lib/rugged/version.rb
40+
- else
41+
- echo " Version = VERSION = \"$(git describe --tags --first-parent | tail -c +2 | tr '-' '.').pre\"" >> lib/rugged/version.rb
42+
- fi;
43+
- echo "end" >> lib/rugged/version.rb
44+
45+
deploy:
46+
provider: rubygems
47+
api_key:
48+
secure: ffCPQ8RQ+0GTAeHmBUCBMKa2K0aegFd++BQ9m8kNSd2pC/PtWtrqeiG6ZkcEsaN/CbiJrNsetibqMq44IL+r5Eq2NyQC869VfOb0KRExI2ovVfan0NoE1U+pyFOwMy7V5OG6EZ1rCkFazJdEHiPbjO0xoEq4jZuygEIAhQJGvJo=
49+
gem: rugged
50+
on:
51+
condition: "$TRAVIS_OS_NAME = linux"
52+
branch: master
53+
tags: true
54+
repo: libgit2/rugged
55+
ruby: 2.2.2

lib/rugged/version.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module Rugged
2-
Version = VERSION = '0.23.1'
2+
# This file is automatically overwritten during a deployment from Travis.
3+
Version = VERSION = "#{`git describe --tags --first-parent | tail -c +2 | tr '-' '.'`.strip}.pre" rescue "0.0.0.dev"
34
end

0 commit comments

Comments
 (0)