Skip to content

Commit 1052aae

Browse files
committed
Making release a module
1 parent edb2fb5 commit 1052aae

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

scripts/release/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Makes 'release' a Python package.

scripts/release/changelog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ def __init__(self, date: datetime, kind: ChangeKind, title: str, contents: str):
3535

3636

3737
def get_changelog_entries(
38-
previous_version_commit: Commit,
38+
base_commit: Commit,
3939
repo: Repo,
4040
changelog_sub_path: str,
4141
) -> list[ChangeEntry]:
4242
changelog = []
4343

44-
# Compare previous version commit with current working tree
45-
diff_index = previous_version_commit.diff(other=repo.head.commit, paths=changelog_sub_path)
44+
# Compare base commit with current working tree
45+
diff_index = base_commit.diff(other=repo.head.commit, paths=changelog_sub_path)
4646

4747
# No changes since the previous version
4848
if not diff_index:

scripts/release/changelog_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import datetime
22
import unittest
33

4-
from changelog import (
4+
from scripts.release.changelog import (
55
MAX_TITLE_LENGTH,
66
ChangeKind,
77
extract_changelog_entry_from_contents,

0 commit comments

Comments
 (0)