releasinator 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/lib/git_util.rb +12 -3
- data/lib/publisher.rb +4 -4
- data/lib/releasinator/version.rb +1 -1
- data/lib/validator.rb +40 -4
- data/lib/validator_changelog.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99035e7fd8c9c4f656989abf3691c485f9e68bd8
|
4
|
+
data.tar.gz: 6a473481db9b7a4f66195c70f398e0fbc0b6cc01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc52ac52529e6437ffae30a61db4395eb2485e81d8d2e9825ea204decb16624dd03f2b5f71697232387639950c5694686417649f2a96bc258fd6cc7f544d2789
|
7
|
+
data.tar.gz: 1383396a3df9378566522756524e3913f736ab582ebdb40382a4219da2c6298921fe61cbf70e298ee12751faa98b81d311cca8aa933bab341dbc694c10526f4a
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
Releasinator release notes
|
2
2
|
==========================
|
3
3
|
|
4
|
+
0.6.1
|
5
|
+
-----
|
6
|
+
* Improve some error messages.
|
7
|
+
* Add more filetypes to `validate:eof_newlines`.
|
8
|
+
* Disable bullet punctuation detection until multi-line comments can be addressed.
|
9
|
+
|
4
10
|
0.6.0
|
5
11
|
-----
|
6
12
|
* Validate all bulleted items in `CHANGELOG.md` end in punctuation.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
releasinator (0.6.
|
4
|
+
releasinator (0.6.1)
|
5
5
|
colorize (~> 0.7)
|
6
6
|
configatron (~> 4.5)
|
7
7
|
json (~> 1.8)
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
15
|
addressable (2.4.0)
|
16
|
-
colorize (0.8.
|
16
|
+
colorize (0.8.1)
|
17
17
|
configatron (4.5.0)
|
18
18
|
faraday (0.9.2)
|
19
19
|
multipart-post (>= 1.2, < 3)
|
data/lib/git_util.rb
CHANGED
@@ -101,15 +101,24 @@ module Releasinator
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def self.get_local_head_sha1
|
104
|
-
|
104
|
+
rev_parse("head")
|
105
105
|
end
|
106
106
|
|
107
107
|
def self.get_local_branch_sha1(branch_name)
|
108
|
-
|
108
|
+
rev_parse(branch_name)
|
109
109
|
end
|
110
110
|
|
111
111
|
def self.get_remote_branch_sha1(branch_name)
|
112
|
-
|
112
|
+
rev_parse("origin/#{branch_name}")
|
113
|
+
end
|
114
|
+
|
115
|
+
def self.rev_parse(branch_name)
|
116
|
+
output = CommandProcessor.command("git rev-parse --verify #{branch_name} 2>&1 | cat").strip
|
117
|
+
if output.include? 'fatal: Needed a single revision'
|
118
|
+
puts "error: branch or commit '#{branch_name}' does not exist. You may need to checkout this branch.".red
|
119
|
+
abort()
|
120
|
+
end
|
121
|
+
output
|
113
122
|
end
|
114
123
|
|
115
124
|
def self.tag(new_tag, changelog)
|
data/lib/publisher.rb
CHANGED
@@ -5,8 +5,8 @@ require_relative 'printer'
|
|
5
5
|
|
6
6
|
module Releasinator
|
7
7
|
class Publisher
|
8
|
-
def initialize(
|
9
|
-
@
|
8
|
+
def initialize(releasinator_config)
|
9
|
+
@releasinator_config = releasinator_config
|
10
10
|
end
|
11
11
|
|
12
12
|
def publish(repo_url, release)
|
@@ -18,7 +18,7 @@ module Releasinator
|
|
18
18
|
release.version,
|
19
19
|
:name => release.version,
|
20
20
|
:body => release.changelog
|
21
|
-
puts github_release.inspect if @
|
21
|
+
puts github_release.inspect if @releasinator_config[:trace]
|
22
22
|
rescue => error
|
23
23
|
#This will fail if the user does not have push permissions.
|
24
24
|
Printer.fail(error.inspect)
|
@@ -46,7 +46,7 @@ module Releasinator
|
|
46
46
|
head,
|
47
47
|
"Update #{product_name} to #{release.version}",
|
48
48
|
release.changelog
|
49
|
-
puts github_pull_request.inspect if @
|
49
|
+
puts github_pull_request.inspect if @releasinator_config[:trace]
|
50
50
|
rescue => error
|
51
51
|
#This will fail if there's already a pull request
|
52
52
|
Printer.fail(error.inspect)
|
data/lib/releasinator/version.rb
CHANGED
data/lib/validator.rb
CHANGED
@@ -9,6 +9,41 @@ require_relative 'printer'
|
|
9
9
|
require_relative 'validator_changelog'
|
10
10
|
require_relative 'releasinator/version'
|
11
11
|
|
12
|
+
TEXT_FILE_EXTENSIONS = [
|
13
|
+
".md",
|
14
|
+
".txt",
|
15
|
+
".ini",
|
16
|
+
".in",
|
17
|
+
".xml",
|
18
|
+
".gitignore",
|
19
|
+
".npmignore",
|
20
|
+
".html",
|
21
|
+
".css",
|
22
|
+
".h",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
".rspec",
|
26
|
+
".gemspec",
|
27
|
+
".podspec",
|
28
|
+
".rb",
|
29
|
+
".java",
|
30
|
+
".php",
|
31
|
+
".py",
|
32
|
+
".js",
|
33
|
+
".yaml",
|
34
|
+
".json",
|
35
|
+
".sh",
|
36
|
+
".groovy",
|
37
|
+
".gemspec",
|
38
|
+
".gradle",
|
39
|
+
".settings",
|
40
|
+
".properties",
|
41
|
+
"LICENSE",
|
42
|
+
"Rakefile",
|
43
|
+
"Dockerfile"
|
44
|
+
# TODO include C# file types
|
45
|
+
]
|
46
|
+
|
12
47
|
module Releasinator
|
13
48
|
class Validator
|
14
49
|
|
@@ -33,10 +68,11 @@ module Releasinator
|
|
33
68
|
|
34
69
|
def validate_eof_newlines
|
35
70
|
all_git_files = GitUtil.all_files.split
|
36
|
-
text_file_extensions = [".md", ".txt", ".gitignore", "Gemfile", "Gemfile.lock", "LICENSE", "Rakefile", ".rb"]
|
37
71
|
|
38
|
-
important_git_text_files = all_git_files.select{
|
39
|
-
|
72
|
+
important_git_text_files = all_git_files.select{ |filename|
|
73
|
+
TEXT_FILE_EXTENSIONS.any? { |extension|
|
74
|
+
filename.end_with?(extension)
|
75
|
+
}
|
40
76
|
}
|
41
77
|
|
42
78
|
important_git_text_files.each do |filename|
|
@@ -200,7 +236,7 @@ module Releasinator
|
|
200
236
|
|
201
237
|
Dir.chdir(dir) do
|
202
238
|
if !GitUtil.exist?(expected_file_name)
|
203
|
-
puts "#{dir}/#{expected_file_name} not found
|
239
|
+
puts "#{dir}/#{expected_file_name} not found using a case sensitive search within git, searching for similar files...".yellow
|
204
240
|
|
205
241
|
# search for files that are somewhat similar to the file being searched, ignoring case
|
206
242
|
filename_prefix = expected_file_name[0,5]
|
data/lib/validator_changelog.rb
CHANGED
@@ -108,7 +108,6 @@ module Releasinator
|
|
108
108
|
if line.match /^\s*\*\s+.*$/ # regex matches bulleted points
|
109
109
|
if !line.match /^\s*\*\s+.*[\!,\?:\.]$/ # regex matches bullet points with punctuation
|
110
110
|
Printer.fail("'#{line}' is invalid. Bulleted points should end in punctuation.")
|
111
|
-
abort()
|
112
111
|
end
|
113
112
|
end
|
114
113
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: releasinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|