File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 4
4
BUNDLE_PATH : .vendor
5
5
6
6
vars :
7
- VERSION :
7
+ GIT_DESCRIBE :
8
8
sh : git describe --tags --dirty --always
9
9
GEM_VERSION :
10
- sh : ruby -e "puts Gem::Version.new(ARGV[0].split('-')[0] + '-' + ARGV[0].split('-')[1..].join('.'))" {{.VERSION }}
10
+ sh : ruby -e "if Gem::Version.new(ARGV[0]).prerelease? then puts Gem::Version.new(Gem::Version.new( ARGV[0].split('-')[0]).bump().to_s + '-' + ARGV[0].split('-')[1..].join('.')) else puts Gem::Version.new(ARGV[0]) end " {{.GIT_DESCRIBE }}
11
11
GEM_NAME : jekyll-rdf
12
12
DOCKER_IMAGE : aksw/jekyll-rdf
13
13
22
22
desc : Output some variables
23
23
cmds :
24
24
- |
25
- echo "VERSION : {{.VERSION }}"
25
+ echo "GIT_DESCRIBE : {{.GIT_DESCRIBE }}"
26
26
echo "GEM_VERSION: {{.GEM_VERSION}}"
27
27
echo "GEM_NAME: {{.GEM_NAME}}"
28
28
echo "DOCKER_IMAGE: {{.DOCKER_IMAGE}}"
45
45
docker:build :
46
46
desc : The list of all defined tasks
47
47
cmds :
48
- - docker build --no-cache --build-arg VERSION={{.VERSION }} -t {{.DOCKER_IMAGE}}:{{.VERSION }} .
48
+ - docker build --no-cache --build-arg VERSION={{.GEM_VERSION }} -t {{.DOCKER_IMAGE}}:{{.GEM_VERSION }} .
49
49
50
50
test :
51
51
desc : Run the tests
Original file line number Diff line number Diff line change @@ -3,7 +3,12 @@ RELEASE_VERSION = case
3
3
when ENV [ 'VERSION' ] then ENV [ 'VERSION' ]
4
4
else
5
5
version = `git describe --tags --dirty --always`
6
- version . split ( '-' ) [ 0 ] + '-' + version . split ( '-' ) [ 1 ..] . join ( '.' )
6
+ # if Gem::Version.new(ARGV[0]).prerelease? then puts Gem::Version.new(Gem::Version.new(ARGV[0].split('-')[0]).bump().to_s + '-' + ARGV[0].split('-')[1..].join('.')) else puts Gem::Version.new(ARGV[0]) end
7
+ if Gem ::Version . new ( version ) . prerelease? then
8
+ Gem ::Version . new ( Gem ::Version . new ( version . split ( '-' ) [ 0 ] ) . bump ( ) . to_s + '-' + version . split ( '-' ) [ 1 ..] . join ( '.' ) )
9
+ else
10
+ Gem ::Version . new ( version )
11
+ end
7
12
end
8
13
9
14
Gem ::Specification . new do |s |
You can’t perform that action at this time.
0 commit comments