Class: Libertine::SCM::Git
Instance Attribute Summary
#dir
Instance Method Summary
collapse
#implement, #released?, #version, #versions
Instance Method Details
#files ⇒ Object
7
8
9
|
# File 'lib/libertine/scm/git.rb', line 7
def files
Dir.chdir(dir) { `git ls-files`.split }
end
|
#release ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/libertine/scm/git.rb', line 11
def release
super
Dir.chdir dir do
unless /^\* master$/ =~ `git branch`
raise Libertine::Error, "Only release from the master branch!"
end
unless `git status -s`.empty?
sh "git commit --allow-empty -am 'Release v#{version}.'"
end
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
end
end
|
#releaseable? ⇒ Boolean
29
30
31
|
# File 'lib/libertine/scm/git.rb', line 29
def releaseable?
true
end
|
33
34
35
|
# File 'lib/libertine/scm/git.rb', line 33
def tags
Dir.chdir(dir) { `git tag -l 'v*'`.split }
end
|