Skip to content

Commit 3d57403

Browse files
committed
[releaser] Update to use git add -u as requested by maintainer
- Changed from selective file staging to git add -u approach - Stages all modified tracked files for better future compatibility - Maintains security by not adding untracked files - Addresses maintainer feedback for automatic version bumping support
1 parent e2448a0 commit 3d57403

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

openwisp_utils/releaser/release.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,11 @@ def main():
358358
["git", "checkout", "-b", release_branch], check=True, capture_output=True
359359
)
360360

361-
print("Adding release-related files to git...")
362-
# Add only the specific files that were modified during the release process
363-
files_to_add = [config["changelog_path"]]
364-
365-
# Add version file if it exists and was modified
366-
version_path = config.get("version_path")
367-
if version_path and os.path.exists(version_path):
368-
files_to_add.append(version_path)
369-
370-
for file_path in files_to_add:
371-
subprocess.run(["git", "add", file_path], check=True, capture_output=True)
361+
print("Adding all modified tracked files to git...")
362+
# Using 'git add -u' to stage all modified tracked files
363+
# This includes changelog, version files, and any other modified files
364+
# which is useful for supporting automatic version bumping across different repo types
365+
subprocess.run(["git", "add", "-u"], check=True, capture_output=True)
372366

373367
commit_message = f"{new_version} release"
374368
subprocess.run(

0 commit comments

Comments
 (0)