Skip to content

Commit

Permalink
fix: update changelog updater script (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
stew-ro authored Sep 23, 2020
1 parent f2db74e commit 7c4848c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
2.1-Preview's released container image (mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:2.1.012970002-amd64-preview) currently references **2.1-preview.1-0633507 (09-14-2020)**

## Commit history
### 2.1-preview.1-f2db74e (09-17-2020)
* docs: udpate changlog with docker image reference ([#590](https://github.com/microsoft/OCR-Form-Tools/commit/f2db74e322c32338eba3b2df06c01a51cfb7ebc1))

### 2.1-preview.1-1a6b78e (09-16-2020)
* fix: normalize folder path starting with a period ([#592](https://github.com/microsoft/OCR-Form-Tools/commit/1a6b78e054235da3188aafbe65636a8c18b439bf))
* fix: change label folder uri title ([#588](https://github.com/microsoft/OCR-Form-Tools/commit/7e4233e568d94817e23dda5ef5513b9ee7475d11))
Expand Down
6 changes: 3 additions & 3 deletions public/updateChangelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ def insterIntoChanglogContents(message):
commits = list(repo.iter_commits("master"))
for commit in commits:
commitHex = commit.hexsha[:7]
if commitHex == lastChanglogCommit:
print("found last change log commit")
break
commitDate = commit.committed_datetime.strftime("%m-%d-%Y")
if currentCommitDate != commitDate:
if currentCommitDate is not None:
insterIntoChanglogContents("\n")
currentCommitDate = commitDate
insterIntoChanglogContents("### " + appVersion + "-" + commitHex + " (" + commitDate + ")\n")
if commitHex == lastChanglogCommit:
print("found last change log commit")
break
commitMessage = commit.message.partition('\n')[0]
commitMessageRegex = re.compile("(.*)\(\#(\d+)\)\s*$")
match = commitMessageRegex.search(commitMessage)
Expand Down

0 comments on commit 7c4848c

Please sign in to comment.