File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 1
- # Travis-CI Build for rugged
2
- # see travis-ci.org for details
3
-
4
1
language : ruby
5
2
cache : bundler
6
3
7
4
os :
8
5
- linux
9
6
- osx
10
7
11
- # Ruby versions to test against
12
8
rvm :
13
9
- 1.9.3
14
10
- 2.0.0
@@ -37,3 +33,24 @@ before_install:
37
33
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ./vendor/libgit2/script/install-deps-osx.sh; fi
38
34
39
35
script : script/travisbuild
36
+
37
+ before_deploy :
38
+ - echo "module Rugged" > lib/rugged/version.rb
39
+ - if [ ! -z "$TRAVIS_TAG" ]; then
40
+ - echo " Version = VERSION = \"$(echo "$TRAVIS_TAG" | tail -c +2)\"" >> lib/rugged/version.rb
41
+ - else
42
+ - echo " Version = VERSION = \"$(git describe --tags --first-parent | tail -c +2 | tr '-' '.').pre\"" >> lib/rugged/version.rb
43
+ - fi;
44
+ - echo "end" >> lib/rugged/version.rb
45
+
46
+ deploy :
47
+ provider : rubygems
48
+ api_key :
49
+ secure : ffCPQ8RQ+0GTAeHmBUCBMKa2K0aegFd++BQ9m8kNSd2pC/PtWtrqeiG6ZkcEsaN/CbiJrNsetibqMq44IL+r5Eq2NyQC869VfOb0KRExI2ovVfan0NoE1U+pyFOwMy7V5OG6EZ1rCkFazJdEHiPbjO0xoEq4jZuygEIAhQJGvJo=
50
+ gem : rugged
51
+ on :
52
+ condition : " $TRAVIS_OS_NAME = linux"
53
+ branch : master
54
+ tags : true
55
+ repo : libgit2/rugged
56
+ ruby : 2.2.2
Original file line number Diff line number Diff line change 1
1
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"
3
4
end
You can’t perform that action at this time.
0 commit comments