semmy 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcbc2657b06bf0df7c163d8ea8315fc198c80f3884a094f51776e051016fe888
4
- data.tar.gz: 85206e2e16a0b8cd4b8af9165434fe41febc54b44a116357fb6941c23f606437
3
+ metadata.gz: 3593823ef6863af335da8379285319b3bfcef4ca60b8130ccb1ff98633694c3f
4
+ data.tar.gz: bf08cbcca120b4e42792fe66ba370f751a92712c033b415f28f45814de76d1b1
5
5
  SHA512:
6
- metadata.gz: 67d13f206951da08c55850f3c72a564cdbf73d13f71c683b01f3758a515e5726ba76772f513ac1f35c75cdd25e1e04bfd16288e3fa793ab29738638d2a2b9bf0
7
- data.tar.gz: 236b574f1d7235aefd13105bd3e69a88900f2828611170964b045cb52af56b76a034a4d1dc942bc215f4be3019ddae1b267533a08e458179fdf863a66a6e6314
6
+ metadata.gz: 2f1a2f9f3476e805531cdf4b15db7d9cb7b8fcc589f88db711ae58a7e86f0cb8626047ee563de135b1fb35d733705e3f0eb37de65ed4f130a9545642497d2981
7
+ data.tar.gz: 1b936d088d33fdeb0d6c0c09caee081d6072784ee7fc16d4622555eba5ce1630d4d731884cef94bd53f16c9c80127581ca6cb75487a7bb99137e24b267128a6b
data/CHANGELOG.md CHANGED
@@ -1,45 +1,17 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 1.0.2
3
+ ### Version 1.1.0
4
4
 
5
- 2019-01-21
5
+ 2019-01-23
6
6
 
7
- [Compare changes](https://github.com/tf/semmy/compare/v1.0.1...v1.0.2)
7
+ [Compare changes](https://github.com/tf/semmy/compare/1-0-stable...v1.1.0)
8
8
 
9
- - Ensure test install of gem during `release:prepare` does not hang
10
- waiting for interactive input on uninstall.
11
-
12
- ### Version 1.0.1
13
-
14
- 2018-12-10
15
-
16
- [Compare changes](https://github.com/tf/semmy/compare/v1.0.0...v1.0.1)
17
-
18
- - Require date stdlib to prevent error during prepare.
19
-
20
- ### Version 1.0.0
21
-
22
- 2017-07-13
9
+ - Run same tasks as on `master` when running on major version stable
10
+ branch (e.g. `2-x-stable`).
23
11
 
24
- [Compare changes](https://github.com/tf/semmy/compare/0-x-stable...v1.0.0)
25
-
26
- ##### Breaking Changes
27
-
28
- - A typo in the name of the `changelog_unreleased_section_heading` and
29
- `changelog_unreleased_section_blank_slate` options was fixed.
30
- - The default value of `changelog_unreleased_section_heading` changed
31
- to "Unreleased Changes". You need to update the header in your
32
- changelog or manually set the previous value via the configuration option.
33
-
34
- ##### New Features
35
-
36
- - Add `bump:patch` task which begins a patch level release.
37
- - Add `bump:mahor` task which updates the major version.
38
-
39
- ##### Bug Fixes
40
-
41
- - Fix indentation of generated unreleased changes section.
12
+ - Bug fix: Ensure test install of gem during `release:prepare` does not hang
13
+ waiting for interactive input on uninstall.
42
14
 
43
15
  See
44
- [0-x-stable branch](https://github.com/tf/semmy/blob/0-x-stable/CHANGELOG.md)
16
+ [1-0-stable branch](https://github.com/tf/semmy/blob/1-0-stable/CHANGELOG.md)
45
17
  for previous changes.
data/lib/semmy/scm.rb CHANGED
@@ -6,12 +6,20 @@ module Semmy
6
6
  git.current_branch == 'master'
7
7
  end
8
8
 
9
- def on_stable?(stable_branch_name)
9
+ def on_minor_version_stable?(stable_branch_name)
10
10
  !!git.current_branch.match(stable_branch_matcher(stable_branch_name))
11
11
  end
12
12
 
13
+ def on_major_version_stable?(stable_branch_name)
14
+ !!git.current_branch.match(major_version_stable_branch_matcher(stable_branch_name))
15
+ end
16
+
13
17
  private
14
18
 
19
+ def major_version_stable_branch_matcher(stable_branch_name)
20
+ stable_branch_matcher(stable_branch_name.gsub('%{minor}', 'x'))
21
+ end
22
+
15
23
  def stable_branch_matcher(stable_branch_name)
16
24
  Regexp.new(stable_branch_name.gsub(/%\{\w+\}/, '[0-9]+'))
17
25
  end
data/lib/semmy/tasks.rb CHANGED
@@ -42,9 +42,9 @@ module Semmy
42
42
 
43
43
  desc 'Prepare release'
44
44
  task 'release:prepare' => 'semmy:lint' do
45
- if Scm.on_master?
45
+ if Scm.on_master? || Scm.on_major_version_stable?(config.stable_branch_name)
46
46
  Rake.application['release:prepare:master'].invoke
47
- elsif Scm.on_stable?(config.stable_branch_name)
47
+ elsif Scm.on_minor_version_stable?(config.stable_branch_name)
48
48
  Rake.application['release:prepare:stable'].invoke
49
49
  end
50
50
  end
@@ -58,7 +58,7 @@ module Semmy
58
58
 
59
59
  desc 'Prepare repository for development of next verion'
60
60
  task 'release:after' do
61
- if Scm.on_master?
61
+ if Scm.on_master? || Scm.on_major_version_stable?(config.stable_branch_name)
62
62
  Rake.application['release:after:master'].invoke
63
63
  end
64
64
  end
data/lib/semmy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Semmy
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semmy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Fischbach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-21 00:00:00.000000000 Z
11
+ date: 2019-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git