Skip to content

Commit c1e535f

Browse files
committedNov 23, 2017
[chore] changelog writer.
now we avoid the RCs and Alpha version, so they won't appear on the log. also, now we negate the log entries that are related to releases using a filter, which is better than exclude the first entry using Changelog::log_in_between_versions (that way, sometimes we remove a valid entry).
1 parent a296627 commit c1e535f

File tree

2 files changed

+31
-23
lines changed

2 files changed

+31
-23
lines changed
 

‎CHANGELOG.md

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
v3.1.3 - Wed, 22 Nov 2017 16:37:37 UTC
1+
v3.1.3 - Wed, 22 Nov 2017 16:38:06 UTC
22
--------------------------------------
33

4-
-
4+
- [c434e84](../../commit/c434e84) [fixed] Respect overflow css property when determining whether or not a tabbable node is hidden
55

66

7-
v3.1.2 - Mon, 06 Nov 2017 19:52:38 UTC
7+
v3.1.2 - Mon, 06 Nov 2017 19:56:00 UTC
88
--------------------------------------
99

10+
- [3c86e2d](../../commit/3c86e2d) [fixed] shouldFocusAfterRender and shouldReturnFocusAfterClose flags.
1011
- [0f2bf9e](../../commit/0f2bf9e) [fixed] corretly walk when using TAB.
1112
- [5cf9326](../../commit/5cf9326) Update README.md
1213
- [cdcc1cb](../../commit/cdcc1cb) [chore]: fixed changelog generator.
@@ -20,22 +21,24 @@ v3.1.0 - Wed, 25 Oct 2017 14:26:17 UTC
2021
- [18a15eb](../../commit/18a15eb) [fixed] correct property name shouldFocusAfterRender.
2122

2223

23-
v3.0.4 - Wed, 18 Oct 2017 19:52:46 UTC
24+
v3.0.4 - Wed, 18 Oct 2017 19:55:15 UTC
2425
--------------------------------------
2526

27+
- [5ec0f7f](../../commit/5ec0f7f) [fixed] Removes body classNames after the modal is closed.
2628
- [1fb33d9](../../commit/1fb33d9) [chore] run tests only on node 8.
2729
- [59fbdb3](../../commit/59fbdb3) [chore] specifiy the object when overriding class names.
2830

2931

30-
v3.0.3 - Sat, 14 Oct 2017 17:37:10 UTC
32+
v3.0.3 - Sat, 14 Oct 2017 17:38:38 UTC
3133
--------------------------------------
3234

33-
-
35+
- [32441c3](../../commit/32441c3) [fixed] Issue #526 Import PropTypes as default import.
3436

3537

36-
v3.0.2 - Sat, 14 Oct 2017 12:03:32 UTC
38+
v3.0.2 - Sat, 14 Oct 2017 12:04:40 UTC
3739
--------------------------------------
3840

41+
- [1d495a6](../../commit/1d495a6) [fixed] Add shouldCloseOnEsc prop
3942
- [d98f091](../../commit/d98f091) [chore] update CHANGELOG.md
4043
- [95f628a](../../commit/95f628a) [chore] fix prettier linting after merge issue
4144
- [47d0d87](../../commit/47d0d87) [chore] prettier all the things
@@ -47,30 +50,28 @@ v3.0.2 - Sat, 14 Oct 2017 12:03:32 UTC
4750
v3.0.0 - Fri, 06 Oct 2017 13:29:20 UTC
4851
--------------------------------------
4952

50-
- [a2a7128](../../commit/a2a7128) Release v3.0.0.
5153
- [d0f242b](../../commit/d0f242b) Merged next into master.
5254
- [de3c039](../../commit/de3c039) [chore] remove warning about injectCSS.
5355
- [f77b53e](../../commit/f77b53e) [chore] use canUseDOM from exenv.
5456
- [cc4577c](../../commit/cc4577c) Release 3.0.0-rc2.
5557
- [1260850](../../commit/1260850) [fixed] backward compatibility with previous react versions.
56-
- [45ca9d4](../../commit/45ca9d4) Release v3.0.0-rc1.
5758
- [d25563c](../../commit/d25563c) [fixed] check for both window and document.createElement.
5859
- [2b835d6](../../commit/2b835d6) [fixed] typeof returns a string (canUseDOM).
59-
- [cd10612](../../commit/cd10612) Release v3.0.0-alpha.
6060
- [b942504](../../commit/b942504) [feature] initial support for react 16.
6161

6262

63-
v2.4.1 - Fri, 06 Oct 2017 13:23:42 UTC
63+
v2.4.1 - Fri, 06 Oct 2017 12:09:11 UTC
6464
--------------------------------------
6565

6666
- [4fa5628](../../commit/4fa5628) [fixed] Drag stop (mouseup) on Overlay closes Modal
6767
- [a712d88](../../commit/a712d88) [chore] update README.md installation for react 16 support.
6868
- [f9a2f3f](../../commit/f9a2f3f) [chore] update README.md.
6969

7070

71-
v2.3.3 - Wed, 04 Oct 2017 01:59:30 UTC
71+
v2.3.3 - Wed, 04 Oct 2017 01:59:57 UTC
7272
--------------------------------------
7373

74+
- [ace2bf0](../../commit/ace2bf0) [chore] added babel-cli to compile and fix dist configuration.
7475
- [876972b](../../commit/876972b) [chore] removed depencendy 'react-dom-factory'.
7576
- [73db6dd](../../commit/73db6dd) [chore] improve examples style.
7677
- [8970956](../../commit/8970956) [chore] remove code climate yml.
@@ -82,9 +83,10 @@ v2.3.3 - Wed, 04 Oct 2017 01:59:30 UTC
8283
- [f007aeb](../../commit/f007aeb) [chore] Update description for onRequestClose.
8384

8485

85-
v2.3.2 - Wed, 06 Sep 2017 16:09:58 UTC
86+
v2.3.2 - Wed, 06 Sep 2017 16:10:27 UTC
8687
--------------------------------------
8788

89+
- [54c59c5](../../commit/54c59c5) Export default property in CommonJS and global object
8890
- [ba526cf](../../commit/ba526cf) [chore] fix changelog generator.
8991

9092

@@ -100,7 +102,11 @@ v2.2.4 - Mon, 14 Aug 2017 09:41:39 UTC
100102

101103
- [fafa127](../../commit/fafa127) typo fix
102104
- [fe1983b](../../commit/fe1983b) fix #466: Dragging inside modal and release outside of modal closes the modal
103-
- [825fd00](../../commit/825fd00) Release v2.2.3.
105+
106+
107+
v2.2.3 - Thu, 10 Aug 2017 19:27:47 UTC
108+
--------------------------------------
109+
104110
- [1caabed](../../commit/1caabed) [fixed] `Uncaught TypeError: Cannot read property 'state' of null` when unmouting
105111
- [92c23b5](../../commit/92c23b5) [chore] Mention shouldCloseOnOverlayClick dependency
106112
- [a2d5c4e](../../commit/a2d5c4e) [chore] allow latest version for exenv dependency

‎scripts/changelog.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import sys
44
import os
5+
import re
56
import json
67
from datetime import datetime
78
import pytz
@@ -10,10 +11,7 @@
1011

1112
class Version(object):
1213
def __init__(self, version):
13-
v = version
14-
if v.startswith('v'):
15-
v = v[1:].split('\n')[0]
16-
fix = v.split('.')
14+
fix = re.search('[v]?(\d+)\.(\d+).(\d+).*', version).groups()
1715
self.major = int(fix[0])
1816
self.minor = int(fix[1])
1917
self.patch = int(fix[2])
@@ -34,6 +32,9 @@ def __init__(self, info):
3432
self.a = a
3533
self.b = b
3634

35+
def denyReleases(self, log):
36+
return not ('release v' in log or 'Release v' in log)
37+
3738
def log_in_between_versions(self):
3839
hash = self.log.split(' ')[0]
3940

@@ -51,12 +52,12 @@ def log_in_between_versions(self):
5152
log = str(self.a) + " - " + dt + " UTC\n"
5253
log = log + ("-" * (len(log) - 1)) + "\n\n"
5354

54-
actual_log = self.log.splitlines()
55+
actual_log = list(filter(self.denyReleases, self.log.splitlines()))
5556

56-
if len(actual_log) == 1:
57-
entries = "-\n\n"
57+
if len(actual_log) == 0:
58+
entries = '-\n\n'
5859
else:
59-
entries = "\n".join(map(url_entry, actual_log[1:])) + "\n\n"
60+
entries = "\n".join(map(url_entry, actual_log)) + "\n\n"
6061

6162
log = log + entries
6263

@@ -136,7 +137,8 @@ def changelog(with_versions):
136137
process = lines.splitlines()
137138

138139
for item in process:
139-
versions.append(Version(item))
140+
if not ('rc' in item or 'alpha' in item):
141+
versions.append(Version(item))
140142

141143
versions = sorted(versions, key=compareversions, reverse=True)
142144

0 commit comments

Comments
 (0)
Please sign in to comment.