Skip to content

Commit

Permalink
better CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
daitangio committed Jan 14, 2020
1 parent dfe3209 commit bab3cf4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
@@ -1,4 +1,5 @@
c064c2b (HEAD -> master) test changelog and tagging
dfe3209 (HEAD -> master, tag: v1.0.1) Changelog supports auto-tagging+run support one extra quoted params
c064c2b test changelog and tagging
b46b054 CHANGELOG test
11b3e91 (tag: v1.0.0) Minor fixes
cda3313 run_each sequential + fixes + run_if_modified
Expand All @@ -8,3 +9,5 @@ f8537e8 Reformatted with python black
94534a2 Update README.md
17bb8ce Updated readme.md: better explanation
9399ec3 Added experimental run_each
fbc90f0 First base code
e73bd8e Initial commit
13 changes: 8 additions & 5 deletions changelog.py
Expand Up @@ -8,24 +8,27 @@
import sys

def make_change_log(unused):
run("git log -10 --decorate --oneline >CHANGELOG.md")

run("git log -25 --decorate --oneline >CHANGELOG.md")
run("git diff -w CHANGELOG.md")

def noop(unused=None, unused2=None):
return True

if __name__ == "__main__":
logging.basicConfig(format='[%(levelname)s] %(threadName)s %(thread)d %(filename)s.%(funcName)s %(message)s',
level=logging.INFO)
def check(fname):
return run_if_modified(fname, lambda unused: True)
return run_if_modified(fname, noop)
c=run_each(".","*.py", check)
c=c+run_each(".","README.md", check)
if (c >0 ):
make_change_log(c)
print("Changed files:",c )
else:
if run_if_missed("CHANGELOG.md", make_change_log):
print("CREATED")
print("CREATED")
else:
print("?NO MODIFICATION DONE")
print("?NO MODIFICATION DONE")
if len(sys.argv) >=3:
tag=sys.argv[1]
comment=sys.argv[2]
Expand Down

0 comments on commit bab3cf4

Please sign in to comment.