Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparation for release #1100

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -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 changes: 38 additions & 0 deletions docs/Changelog-1.3.0.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 0 additions & 1 deletion newsfragments/978.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/build-labels.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/build-platform.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/build-ssh.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/cache-fields-support.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/check-if-pod-exists.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/conditional-dependencies.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/container-no-hosts.feature

This file was deleted.

2 changes: 0 additions & 2 deletions newsfragments/default_net_behavior_compat.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/default_net_name_compat.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/device_cgroup_rules.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/dont-resolve-links-to-compose-file.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/down-removes-network.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/long-log-lines.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/network-mode-none.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/network-scoped-aliases.feature

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/network_level_mac_address.feature

This file was deleted.

2 changes: 0 additions & 2 deletions newsfragments/network_mode_networks.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/python313.misc

This file was deleted.

This file was deleted.

40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
33 changes: 33 additions & 0 deletions scripts/Changelog-template.jinja
Original file line number Diff line number Diff line change
@@ -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
24 changes: 18 additions & 6 deletions scripts/make_release.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 14 additions & 0 deletions scripts/make_release_notes.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions scripts/make_release_upload.sh
Original file line number Diff line number Diff line change
@@ -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/*
Loading