Skip to content

Commit

Permalink
Publish the releasing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
lubosmj authored and mdellweg committed Oct 9, 2024
1 parent 83866f2 commit e627e91
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ def main():

if "github" in sections:
migrate_pytest_plugins(plugin_root_dir)
append_releasing_to_manifest(plugin_root_dir)

if plugin_root_dir:
print("\nDeprecation check:")
Expand Down Expand Up @@ -379,6 +380,14 @@ def migrate_pytest_plugins(plugin_root_dir):
fp.writelines(lines)


def append_releasing_to_manifest(plugin_root):
manifest_file = Path(plugin_root) / "MANIFEST.in"
if manifest_file.exists():
manifest_text = manifest_file.read_text()
if "exclude releasing.md" not in manifest_text:
manifest_file.write_text(manifest_text + "exclude releasing.md\n")


def to_nice_yaml(data):
"""Implement a filter for Jinja 2 templates to render human readable YAML."""
return yaml.dump(data, indent=2, allow_unicode=True, default_flow_style=False)
Expand Down
1 change: 1 addition & 0 deletions templates/bootstrap/MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ include LICENSE
include pyproject.toml
include requirements.txt
include unittest_requirements.txt
exclude releasing.md
22 changes: 22 additions & 0 deletions templates/github/releasing.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% include 'header.md.j2' %}
# Releasing (For Internal Use)

This document outlines the steps to perform a release.

### Determine if a Release is Required
- Run the release checker script:
```
python3 .ci/scripts/check_release.py
```

### Create a New Y-branch (e.g., 3.23)
- If a new minor version (Y) is needed, trigger a [Create New Release Branch](https://github.com/pulp/{{ plugin_name }}/actions/workflows/create-branch.yml) job via the GitHub Actions.
- Look for the "Bump minor version" pull request and merge it.

### Release a New Z-version (Patch Release) (e.g., 3.23.1, 3.22.12)
- Trigger a [Release Pipeline](https://github.com/pulp/{{ plugin_name }}/actions/workflows/release.yml) job by specifying the release branch (X.Y) via the GitHub Actions.

### Final Steps (Optional but Recommended)
- Ensure the new version appears on PyPI.
- Verify that the changelog has been updated by looking for the "Update Changelog" pull request.
- Post a brief announcement about the new release on the [Pulp Discourse](https://discourse.pulpproject.org/).
6 changes: 6 additions & 0 deletions templates/header.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[//]: # "WARNING: DO NOT EDIT!"
[//]: # ""
[//]: # "This file was generated by plugin_template, and is managed by it. Please use"
[//]: # "'./plugin-template --{{ section }} {{ plugin_name | snake }}' to update this file."
[//]: # ""
[//]: # "For more info visit https://github.com/pulp/plugin_template"

0 comments on commit e627e91

Please sign in to comment.