releasinator 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +5 -0
- data/README.md +5 -4
- data/lib/changelog/validator.rb +9 -5
- data/lib/git_util.rb +4 -0
- data/lib/releasinator/version.rb +1 -1
- data/lib/validator.rb +8 -0
- metadata +2 -4
- data/Gemfile.lock +0 -48
- data/lib/validator_changelog.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab62a0c97b76f7949927089ed8756d227bc562da
|
4
|
+
data.tar.gz: 984e1bab0a50be8123d97bf5c0f65de91864786d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5e7bc23e4894f7decf65be066cb1abc3e9932ed01bd7423563a39e56000a029e763cec8c676a058c3d6b4229f15f1fa80042fc5bb398eeebac5bf4b27e4471f
|
7
|
+
data.tar.gz: 43e238ce42076e9ec99225d15654532a48ef1653c369176d5fd466162e0cf956ddc959eac178b0c602a75f5b7ae9106bf48e0fcc9f8cf6a4c52048fc4d0598f3
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Releasinator release notes
|
2
2
|
==========================
|
3
3
|
|
4
|
+
0.6.3
|
5
|
+
-----
|
6
|
+
* When using git flow, validate the release branch is an ancestor of the develop branch. User must confirm a warning if is not.
|
7
|
+
* Update some error messages.
|
8
|
+
|
4
9
|
0.6.2
|
5
10
|
-----
|
6
11
|
* Re-enable bullet punctuation detection, now handling multi-line comments correctly!
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## Problem
|
6
6
|
|
7
|
-
When automating a release process for libraries, SDKs, apps, or other open source projects, many teams have different ideas. This is on top of the fact that each language has its own conventions and repositories for distributing packages. The release process is a hurdle that makes it hard for new project members to ramp up. One
|
7
|
+
When automating a release process for libraries, SDKs, apps, or other open source projects, many teams have different ideas. This is on top of the fact that each language has its own conventions and repositories for distributing packages. The release process is a hurdle that makes it hard for new project members to ramp up. One should not have to read a `release_process.md` to release an open source project.
|
8
8
|
|
9
9
|
## Solution
|
10
10
|
|
@@ -110,7 +110,7 @@ task :"validate:changelog" do
|
|
110
110
|
puts "validating changelog complete, let's dance!".red
|
111
111
|
end
|
112
112
|
```
|
113
|
-
This will
|
113
|
+
This will append the task `validate:changelog`, running the code block after the official releasinator task contents have run. See [this blog post](http://www.dan-manges.com/blog/modifying-rake-tasks) for a detailed description of how this mechanism works. You may append a task more than once.
|
114
114
|
|
115
115
|
## Conventions
|
116
116
|
|
@@ -122,7 +122,8 @@ The releasinator enforces certain conventions. If a filename closely matches th
|
|
122
122
|
4. `CHANGELOG.md` - This file is the source of truth for the releasinator. The file should be organized with the most recent release on top, and formatted correctly. The latest release is the one used when the releasinator executes, so it is a precondition that the `CHANGELOG.md` has been edited and committed **prior to releasing**.
|
123
123
|
1. Releases either are contained within an Alt-H2 (`------`) or `##H2` format. Any other format will be rejected.
|
124
124
|
2. Each release MUST start with the release version, and may contain any following text, such as the date, and/or any release summary.
|
125
|
-
|
125
|
+
3. Releases MUST not skip versions (such as `1.0.0 -> 1.0.2`, or `1.0.2 -> 1.1.1`). That is, if you skip or botch a release, it MUST be documented as an official release with a minimal description suggesting that this release is not actually available, or was skipped. This is for the benefit future maintainers of the repo to know that certain releases were not actually published or are not to be used (for whatever reason). In addition, external developers benefit when they look to upgrade versions and want to know what changes were made since a particular release. They can rest at ease knowing that there are no unaccounted-for releases.
|
126
|
+
5. `.gitignore` and `.DS_store`: While this file is Mac-specific, many repos contain this entry in their `.gitignore` files because it is quite common for developers to have their global `.gitignore` configured incorrectly. Therefore, the authors of this project have made the decision to force this entry in all `.gitignore` files as a gesture of goodwill to all these new git users.
|
126
127
|
|
127
128
|
## Behind the Scenes
|
128
129
|
|
@@ -182,7 +183,7 @@ The releasinator enforces certain conventions. If a filename closely matches th
|
|
182
183
|
9. ✓ Push to external repo (once live in external package manager).
|
183
184
|
10. ✓ Create PRs into any downstream dependencies, including the release notes in the PR. Examples:
|
184
185
|
|
185
|
-
* Create a PR into Cordova when there
|
186
|
+
* Create a PR into Cordova when there is an Android or iOS release.
|
186
187
|
* Create a PR into any other framework that has a direct dependency on this repo.
|
187
188
|
|
188
189
|
11. Using the downstream methods, one can add those same release notes within the release notes of the downstream repo.
|
data/lib/changelog/validator.rb
CHANGED
@@ -86,7 +86,7 @@ module Releasinator
|
|
86
86
|
end
|
87
87
|
|
88
88
|
if changelog_hash.empty?
|
89
|
-
Printer.fail("Unable to find any releases in the CHANGELOG.md. Please check that
|
89
|
+
Printer.fail("Unable to find any releases in the CHANGELOG.md. Please check that the formatting is correct.")
|
90
90
|
abort()
|
91
91
|
end
|
92
92
|
|
@@ -110,8 +110,7 @@ module Releasinator
|
|
110
110
|
|
111
111
|
if starts_with_bullet? line
|
112
112
|
if previous_line_in_progress
|
113
|
-
|
114
|
-
abort()
|
113
|
+
fail_punctuation(previous_line_in_progress)
|
115
114
|
elsif ends_with_punctuation? line
|
116
115
|
# self-contained line is a-ok, and the usual use-case
|
117
116
|
previous_line_in_progress = nil
|
@@ -135,8 +134,8 @@ module Releasinator
|
|
135
134
|
|
136
135
|
# the last line may not be clean. Handle it.
|
137
136
|
if previous_line_in_progress
|
138
|
-
|
139
|
-
|
137
|
+
fail_punctuation(previous_line_in_progress)
|
138
|
+
|
140
139
|
end
|
141
140
|
end
|
142
141
|
|
@@ -147,6 +146,11 @@ module Releasinator
|
|
147
146
|
def ends_with_punctuation?(line)
|
148
147
|
line.match /.*[\!,\?:\.]$/
|
149
148
|
end
|
149
|
+
|
150
|
+
def fail_punctuation(line)
|
151
|
+
Printer.fail("'#{line}' is invalid. Bulleted points should end in punctuation and no trailing line whitespace.")
|
152
|
+
abort()
|
153
|
+
end
|
150
154
|
end
|
151
155
|
end
|
152
156
|
end
|
data/lib/git_util.rb
CHANGED
@@ -121,6 +121,10 @@ module Releasinator
|
|
121
121
|
output
|
122
122
|
end
|
123
123
|
|
124
|
+
def self.is_ancestor?(root_branch, child_branch)
|
125
|
+
"0" == CommandProcessor.command("git merge-base --is-ancestor #{root_branch} #{child_branch}; echo $?").strip
|
126
|
+
end
|
127
|
+
|
124
128
|
def self.tag(new_tag, changelog)
|
125
129
|
confirm_tag_overwrite(new_tag)
|
126
130
|
puts "tagging with changelog: \n\n#{changelog}\n".yellow
|
data/lib/releasinator/version.rb
CHANGED
data/lib/validator.rb
CHANGED
@@ -359,6 +359,14 @@ module Releasinator
|
|
359
359
|
abort()
|
360
360
|
end
|
361
361
|
|
362
|
+
# validate that develop is an ancestor of release branch. Warn if not, but allow user to proceed, as this may be desired for maintenance releases.
|
363
|
+
if current_branch == expected_release_branch
|
364
|
+
root_branch = "develop"
|
365
|
+
if !GitUtil.is_ancestor?(root_branch, current_branch)
|
366
|
+
Printer.check_proceed("#{current_branch} is missing commits from #{root_branch}. Are you sure you want to continue?", "Please rebase #{current_branch} to include the latest from #{root_branch}.")
|
367
|
+
end
|
368
|
+
end
|
369
|
+
|
362
370
|
# validate that master is up to date, because git flow requires this.
|
363
371
|
validate_local_matches_remote("master")
|
364
372
|
else
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -149,7 +149,6 @@ files:
|
|
149
149
|
- CHANGELOG.md
|
150
150
|
- CONTRIBUTING.md
|
151
151
|
- Gemfile
|
152
|
-
- Gemfile.lock
|
153
152
|
- LICENSE
|
154
153
|
- README.md
|
155
154
|
- Rakefile
|
@@ -169,7 +168,6 @@ files:
|
|
169
168
|
- lib/releasinator/version.rb
|
170
169
|
- lib/tasks/releasinator.rake
|
171
170
|
- lib/validator.rb
|
172
|
-
- lib/validator_changelog.rb
|
173
171
|
- releasinator.gemspec
|
174
172
|
homepage: https://developer.paypal.com
|
175
173
|
licenses:
|
data/Gemfile.lock
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
releasinator (0.6.2)
|
5
|
-
colorize (~> 0.7)
|
6
|
-
configatron (~> 4.5)
|
7
|
-
json (~> 1.8)
|
8
|
-
octokit (~> 4.0)
|
9
|
-
semantic (~> 1.4)
|
10
|
-
vandamme (~> 0.0.11)
|
11
|
-
|
12
|
-
GEM
|
13
|
-
remote: https://rubygems.org/
|
14
|
-
specs:
|
15
|
-
addressable (2.4.0)
|
16
|
-
colorize (0.8.1)
|
17
|
-
configatron (4.5.0)
|
18
|
-
faraday (0.9.2)
|
19
|
-
multipart-post (>= 1.2, < 3)
|
20
|
-
github-markup (1.4.0)
|
21
|
-
json (1.8.3)
|
22
|
-
multipart-post (2.0.0)
|
23
|
-
octokit (4.3.0)
|
24
|
-
sawyer (~> 0.7.0, >= 0.5.3)
|
25
|
-
power_assert (0.3.0)
|
26
|
-
rake (11.2.2)
|
27
|
-
redcarpet (3.3.4)
|
28
|
-
sawyer (0.7.0)
|
29
|
-
addressable (>= 2.3.5, < 2.5)
|
30
|
-
faraday (~> 0.8, < 0.10)
|
31
|
-
semantic (1.4.1)
|
32
|
-
test-unit (3.2.0)
|
33
|
-
power_assert
|
34
|
-
vandamme (0.0.11)
|
35
|
-
github-markup (~> 1.3)
|
36
|
-
redcarpet (~> 3.3.2)
|
37
|
-
|
38
|
-
PLATFORMS
|
39
|
-
ruby
|
40
|
-
|
41
|
-
DEPENDENCIES
|
42
|
-
bundler (~> 1.11)
|
43
|
-
rake (~> 11.1)
|
44
|
-
releasinator!
|
45
|
-
test-unit (~> 3.1)
|
46
|
-
|
47
|
-
BUNDLED WITH
|
48
|
-
1.12.5
|
data/lib/validator_changelog.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
|