We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72aeb8c commit 2287173Copy full SHA for 2287173
pum/changelog.py
@@ -94,3 +94,21 @@ def list_changelogs(
94
95
changelogs.sort(key=lambda c: c.version)
96
return changelogs
97
+
98
99
+def changelog_files(changelog: str) -> list[Path]:
100
+ """
101
+ Get the ordered list of SQL files in the changelog directory.
102
+ This is not recursive, it only returns the files in the given changelog directory.
103
+ Args:
104
+ changelog (str): The changelog directory.
105
+ Returns:
106
+ list[Path]: A list of paths to the changelog files.
107
108
+ files = [
109
+ changelog.dir / f
110
+ for f in listdir(changelog.dir)
111
+ if (changelog.dir / f).is_file() and f.endswith(".sql")
112
+ ]
113
+ files.sort()
114
+ return files
0 commit comments