Merge pull request #1100 from p12tic/release

Preparation for release
This commit is contained in:
Povilas Kanapickas 2025-01-07 21:15:30 +02:00 committed by GitHub
commit c63d678887
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 196 additions and 28 deletions

47
RELEASING.md Normal file
View File

@ -0,0 +1,47 @@
Creating a release
==================
This file contains instructions for maintainers on how to release new versions of podman-compose.
Step 1: Initialize variables for subsequent steps
-------------------------------------------------
```
export VERSION=1.2.3
```
Step 2: Release notes PR
------------------------
Open a new branch (e.g. `release`) and run the following:
```
./scripts/make_release_notes.sh $VERSION
```
This collects the release notes using the `towncrier` tool and then commits the result.
This step is done as a PR so that CI can check for spelling errors and similar issues.
Certain file names are not properly supported by the `towncrier` tool and it ignores them.
Check `newsfragments` directory for any forgotten release notes
Step 3: Merge the release notes PR
----------------------------------
Step 4: Perform actual release
------------------------------
Pull the merge commit created on the `main` branch during the step 2.
Then run:
```
./scripts/make_release.sh
```
This will create release commit, tag and push everything.
Step 5: Create a release on Github
----------------------------------
The release notes must be added manually by drafting a release on the GitHub UI at
https://github.com/containers/podman-compose/releases.

38
docs/Changelog-1.3.0.md Normal file
View File

@ -0,0 +1,38 @@
Version 1.3.0 (2025-01-07)
==========================
Bug fixes
---------
- Fixed support for de-facto alternative `Dockerfile` names (e.g. `Containerfile`)
- Fixed a bug that caused attempts to create already existing pods multiple times.
- Fixed compatibility with docker-compose in how symlinks to docker-compose.yml are handled.
- Fixed freeze caused by too long log lines without a newline.
- Fixed support for `network_mode: none`.
- Improved error detection by rejecting service definitions that contain both `network_mode` and
`networks` keys, which is not allowed.
Features
--------
- Added support for build labels.
- Added support for "platform" property in the build command.
- Added support for "ssh" property in the build command.
- Added support for cache_from and cache_to fields in build section.
- Added support for honoring the condition in the depends_on section of the service, if stated.
- Added `x-podman.no_hosts` setting to pass `--no-hosts` to podman run
- Added support for compatibility with docker compose for default network behavior when no network
defined in service. This is controlled via `default_net_behavior_compat` feature flag.
- Added a way to get compatibility of default network names with docker compose.
This is selected by setting `default_net_name_compat: true` on `x-podman` global dictionary.
- Added support for the `device_cgroup_rules` property in services.
- Added support for removing networks in `podman-compose down`.
- Added support for network scoped service aliases.
- Added support for network level `mac_address` attribute.
- Added ability to substitute variables with the environment of the service.
Misc
----
- Declared compatibility with Python 3.13.

View File

@ -1 +0,0 @@
Fixed support for de-facto alternative `Dockerfile` names (e.g. `Containerfile`)

View File

@ -1 +0,0 @@
Added support for build labels.

View File

@ -1 +0,0 @@
Added support for "platform" property in the build command.

View File

@ -1 +0,0 @@
Added support for "ssh" property in the build command.

View File

@ -1 +0,0 @@
Added support for cache_from and cache_to fields in build section.

View File

@ -1 +0,0 @@
Fixed a bug that caused attempts to create already existing pods multiple times.

View File

@ -1 +0,0 @@
Added support for honoring the condition in the depends_on section of the service, if stated.

View File

@ -1 +0,0 @@
Add x-podman.no_hosts setting to pass --no-hosts to podman run

View File

@ -1,2 +0,0 @@
Support docker-compose like default network behavior when no network defined in service via `default_net_behavior_compat` feature flag.

View File

@ -1 +0,0 @@
Added a way to get compatibility of default network names with docker compose. This is selected by setting `default_net_name_compat: true` on `x-podman` global dictionary.

View File

@ -1 +0,0 @@
Added support for the "device_cgroup_rules" property in services.

View File

@ -1 +0,0 @@
Fix compatibility with docker-compose in how symlinks to docker-compose.yml are handled.

View File

@ -1 +0,0 @@
podman-compose down removes networks.

View File

@ -1 +0,0 @@
Fix freeze caused by too long log lines without a newline.

View File

@ -1 +0,0 @@
Fix support for `network_mode: none`.

View File

@ -1 +0,0 @@
Support network scoped service aliases.

View File

@ -1 +0,0 @@
Support network level mac_address attribute.

View File

@ -1,2 +0,0 @@
Improved error detection by rejecting service definitions that contain both "network_mode" and
"networks" keys, which is not allowed.

View File

@ -1 +0,0 @@
Declared compatibility with Python 3.13.

View File

@ -1 +0,0 @@
Add ability to substitute variables with the environment of the service.

View File

@ -13,3 +13,43 @@ force-single-line = true
[tool.ruff.format]
preview = true # needed for quote-style
quote-style = "preserve"
[tool.towncrier]
package = "podman_compose"
package_dir = "master"
directory = "newsfragments"
filename = "docs/Changelog-new.md"
template = "scripts/Changelog-template.jinja"
title_format = "Version {version} ({project_date})"
[[tool.towncrier.section]]
path = ""
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "change"
name = "Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bug fixes"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Misc"
showcontent = true

View File

@ -0,0 +1,33 @@
{% for section, _ in sections|dictsort(by='key') %}
{% set underline = "-" %}
{% if section %}
{{section}}
{{ underline * section|length }}{% set underline = "~" %}
{% endif %}
{% if sections[section] %}
{% for category, val in definitions|dictsort if category in sections[section]%}
{{ definitions[category]['name'] }}
{{ underline * definitions[category]['name']|length }}
{% for text, values in sections[section][category]|dictsort(by='value') %}
- {{ text }}
{% endfor %}
{% if sections[section][category]|length == 0 %}
No significant changes.
{% else %}
{% endif %}
{% endfor %}
{% else %}
No significant changes.
{% endif %}
{% endfor %}
(venv) p12@exec-desktop:~/cod

View File

@ -1,6 +1,18 @@
#!/usr/bin/env bash
./scripts/uninstall.sh
./scripts/clean_up.sh
python3 setup.py register
python3 setup.py sdist bdist_wheel
twine upload dist/*
#!/bin/bash
set -e
if [ $# -ne 1 ]; then
echo "Usage: make_release.sh VERSION"
exit 1
fi
VERSION=$1
sed "s/__version__ = .*/__version__ = \"$VERSION\"/g" -i podman_compose.py
git add podman_compose.py
git commit -m "Release $VERSION"
git tag "v$VERSION" -m "v$VERSION" -s
git push ssh://github.com/containers/podman-compose main "v$VERSION"

14
scripts/make_release_notes.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
if [ $# -ne 1 ]; then
echo "Usage: make_release_notes.sh VERSION"
exit 1
fi
VERSION=$1
towncrier build --version "$VERSION" --yes
git mv "docs/Changelog-new.md" "docs/Changelog-$VERSION.md"
git add "newsfragments/"
git commit -m "Release notes for $VERSION"

6
scripts/make_release_upload.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
./scripts/uninstall.sh
./scripts/clean_up.sh
python3 setup.py register
python3 setup.py sdist bdist_wheel
twine upload dist/*