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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c50b2ca2d8e7f05c2cfdcfb7e6277e88dbe9566
4
- data.tar.gz: bff4e52e4c64da30a0100041af927320366b2263
3
+ metadata.gz: ab62a0c97b76f7949927089ed8756d227bc562da
4
+ data.tar.gz: 984e1bab0a50be8123d97bf5c0f65de91864786d
5
5
  SHA512:
6
- metadata.gz: e59589a4510ae9d20c6c484c852b3d43968ff90c9eae075942ed7d11da245fce889f78208382ac649a6304cd76f74bddb9d62eb7eb4021fa312b2773d66dbd95
7
- data.tar.gz: c7e3f660cf30e2d6d5db862a87dfe46f8027b40befd2a51869c8f1d1b4dcb8ecd694659b7425e9a1168999bd78c4b06873b0453a881bc3bcfa08542fa1646c28
6
+ metadata.gz: e5e7bc23e4894f7decf65be066cb1abc3e9932ed01bd7423563a39e56000a029e763cec8c676a058c3d6b4229f15f1fa80042fc5bb398eeebac5bf4b27e4471f
7
+ data.tar.gz: 43e238ce42076e9ec99225d15654532a48ef1653c369176d5fd466162e0cf956ddc959eac178b0c602a75f5b7ae9106bf48e0fcc9f8cf6a4c52048fc4d0598f3
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  build
2
2
  .DS_Store
3
+
4
+ Gemfile.lock
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 shouldn't have to read a `release_process.md` to release an open source project.
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 '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.
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
- 5. `.gitignore` and `.DS_store`: While this file is Mac-specific, many repos contain this entry in their `.gitignore` files because it's quite common for developers to not have their global `.gitignore` configured correctly. Therefore, the authors of this project have made the decision to force this entry in all `.gitignores`, as a gesture of goodwill to all these new git users.
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's an Android or iOS release.
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.
@@ -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 your formatting is correct.")
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
- Printer.fail("'#{previous_line_in_progress}' is invalid. Bulleted points should end in punctuation.")
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
- Printer.fail("'#{previous_line_in_progress}' is invalid. Bulleted points should end in punctuation.")
139
- abort()
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
@@ -1,3 +1,3 @@
1
1
  module Releasinator
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
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.2
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-07-14 00:00:00.000000000 Z
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
@@ -1 +0,0 @@
1
-