roger 0.12.3 → 0.12.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +4 -0
- data/lib/roger/release/finalizers/rsync.rb +1 -1
- data/lib/roger/release/scm/git.rb +10 -5
- data/roger.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjNlMzQ3MzBkN2E0NmY4NjhkYTEwMDllMTVjMDFlYWU3OThmZGM1YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmUzNTYzMzE3YjIxMzUxY2YwMjBiMDE2NWQyMjYyYjM3YjlmMjQ4Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YThjMmRmZGZjOGM2MmUwNjhiMGIwMTRlOWVlNjc4Y2QxYjhmM2YyNjg0NmFj
|
10
|
+
MGEwNTQwM2Q1NTE5Yzg0ZjY4YmE1OWZmYmZjMDI1OTc2ZWNiOGE5N2Y0NTY5
|
11
|
+
NDRlY2QzMWFmYTQ2MjMxOTE5NmI2Mzk0YzE3MDVkYTAwMjA1YWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTA0MTNkYmZlNGZiYzI0ZmFlOTlkYjliMjVjZGFhZTkwOWQzYmJmODU1MDI2
|
14
|
+
YTc4NzljY2JmNDE0ZmZiNDlhZDI5NzBiODUyNzQ4OGRjNmE0ZjdlNWQzNTg5
|
15
|
+
YjM5OWY4NzUwZTgyODBjNWEyOTE3MjI1YWE0OTkyNDkyODQ0ZDA=
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.12.4
|
4
|
+
* Change upload prompt to conform to the [y/N] convention
|
5
|
+
* Fix git SCM to properly shell escape arguments so it works with special chars in paths
|
6
|
+
|
3
7
|
## Version 0.12.3
|
4
8
|
* Allow release cleaner to work with arrays of globs/paths
|
5
9
|
|
@@ -31,7 +31,7 @@ module Roger::Release::Finalizers
|
|
31
31
|
# Validate options
|
32
32
|
validate_options!(release, options)
|
33
33
|
|
34
|
-
if !options[:ask] || (prompt("Do you wish to upload to #{options[:host]}?
|
34
|
+
if !options[:ask] || (prompt("Do you wish to upload to #{options[:host]}? [y/N]: ")) =~ /\Ay(es)?\Z/
|
35
35
|
begin
|
36
36
|
`#{@options[:rsync]} --version`
|
37
37
|
rescue Errno::ENOENT
|
@@ -34,11 +34,11 @@ module Roger::Release::Scm
|
|
34
34
|
def get_previous_tag_name
|
35
35
|
# Get list of SHA1 that have a ref
|
36
36
|
begin
|
37
|
-
sha1s = `git --git-dir=#{
|
37
|
+
sha1s = `git --git-dir=#{safe_git_dir} log --pretty='%H' --simplify-by-decoration`.split("\n")
|
38
38
|
tags = []
|
39
39
|
while tags.size < 2 && sha1s.any?
|
40
40
|
sha1 = sha1s.shift
|
41
|
-
tag = `git --git-dir=#{
|
41
|
+
tag = `git --git-dir=#{safe_git_dir} describe --tags --exact-match #{sha1} 2>/dev/null`.strip
|
42
42
|
tags << tag if !tag.empty?
|
43
43
|
end
|
44
44
|
tags.last
|
@@ -51,17 +51,22 @@ module Roger::Release::Scm
|
|
51
51
|
@git_dir ||= find_git_dir(@config[:path])
|
52
52
|
end
|
53
53
|
|
54
|
+
# Safely escaped git dir
|
55
|
+
def safe_git_dir
|
56
|
+
Shellwords.escape(self.git_dir.to_s)
|
57
|
+
end
|
58
|
+
|
54
59
|
# Some hackery to determine if we're on a tagged version or not
|
55
60
|
def get_scm_data(ref = @config[:ref])
|
56
61
|
@_version = ""
|
57
62
|
@_date = Time.now
|
58
63
|
begin
|
59
64
|
if File.exist?(git_dir)
|
60
|
-
@_version = `git --git-dir=#{
|
65
|
+
@_version = `git --git-dir=#{safe_git_dir} describe --tags #{ref} 2>&1`
|
61
66
|
|
62
67
|
if $?.to_i > 0
|
63
68
|
# HEAD is not a tagged verison, get the short SHA1 instead
|
64
|
-
@_version = `git --git-dir=#{
|
69
|
+
@_version = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%h" -s 2>&1`
|
65
70
|
else
|
66
71
|
# HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
|
67
72
|
@_version.gsub!(/^v/,"")
|
@@ -69,7 +74,7 @@ module Roger::Release::Scm
|
|
69
74
|
@_version.strip!
|
70
75
|
|
71
76
|
# Get the date in epoch time
|
72
|
-
date = `git --git-dir=#{
|
77
|
+
date = `git --git-dir=#{safe_git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
|
73
78
|
if date =~ /\d+/
|
74
79
|
@_date = Time.at(date.to_i)
|
75
80
|
else
|
data/roger.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-09-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|