File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+
3
+ import argparse
4
+ import sys
5
+
6
+ HASHTAG_RELEASE = "#release"
7
+ HASHTAG_HIDE_CHANGELOG = "#hide"
8
+
9
+ tags = [HASHTAG_RELEASE , HASHTAG_HIDE_CHANGELOG ]
10
+
11
+ def filter_out_tags (commit ):
12
+ for tag in tags :
13
+ commit .replace (tag , "" )
14
+ return commit
15
+
16
+ if __name__ == '__main__' :
17
+ commits = [line .strip () for line in sys .stdin ]
18
+
19
+ build_new = True if len (commits ) > 0 and HASHTAG_RELEASE in commits [0 ] else False
20
+ if not build_new :
21
+ sys .exit (0 )
22
+
23
+ first_commit = True
24
+ for commit in commits :
25
+ # read commits till the last commit that is marked by `HASHTAG_RELEASE`
26
+ if not first_commit and HASHTAG_RELEASE in commit :
27
+ break
28
+ if first_commit :
29
+ first_commit = False
30
+ if HASHTAG_HIDE_CHANGELOG not in commit :
31
+ print (filter_out_tags (commit ))
You can’t perform that action at this time.
0 commit comments