Build Debian artifacts directly from annotated release tags

This commit is contained in:
parkel committed 2026-11-24 08:50:45 +01:00
1 parent 165f3cf7db
commit d9a85fd8d7
3 files changed
+26 -9

No files matched your search

+4 -1
View File
@@ -66,6 +66,9 @@ jobs:
python tools/check_core_release.py dist/*.tar.gz dist/*.whl
python tools/build_deb.py dist/*.tar.gz dist/*.whl
umask 077
python tools/build_deb.py dist/*.tar.gz dist/*.whl --output rebuilt
git -c user.name='Coulobre CI' -c user.email='ci@hippogrief.nl' \
tag --annotate coulobre-ci-artifacts -m 'Verify tagged build'
python tools/build_deb.py dist/*.tar.gz dist/*.whl \
--ref coulobre-ci-artifacts --output rebuilt
cmp dist/*.deb rebuilt/*.deb
dpkg-deb --info dist/*.deb
+8 -5
View File
@@ -145,22 +145,25 @@ and installs the selected operating system services and Python dependencies.
### Use the Gitea APT repository
Use the `resolute` suite on Ubuntu 26.04 or `trixie` on Debian 13. The `main`
component carries final releases. Add `candidate` to the component list on a
test host to opt in to release candidates. A version like `0.13.0~rc1` sorts
before `0.13.0` in APT.
component carries final releases. Use `candidate` on a test host to opt in to
release candidates. A version like `0.13.0~rc1` sorts before `0.13.0` in APT.
```sh
suite=resolute
component=main
registry=https://code.hosting.hippogrief.nl/api/packages/hippogrief/debian
sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsS "$registry/repository.key" -o /etc/apt/keyrings/hippogrief.asc
sudo chmod 0644 /etc/apt/keyrings/hippogrief.asc
printf 'deb [signed-by=/etc/apt/keyrings/hippogrief.asc] %s %s main\n' \
"$registry" "$suite" | sudo tee /etc/apt/sources.list.d/hippogrief.list
printf 'deb [signed-by=/etc/apt/keyrings/hippogrief.asc] %s %s %s\n' \
"$registry" "$suite" "$component" | sudo tee /etc/apt/sources.list.d/hippogrief.list
sudo apt update
sudo apt install coulobre-panel
```
Set `component=candidate` when testing a release candidate. Gitea adds the
`main` component to each suite when its first final package is published.
[Gitea Debian registry documentation](https://docs.gitea.com/usage/packages/debian/)
### Upgrade an installer-managed panel
+14 -3
View File
@@ -13,12 +13,23 @@ from check_core_release import ROOT, git_files, verify_release
def build_package(source, wheel, ref, output):
verify_release(source, wheel, ref)
tracked = git_files(ref)
commit = subprocess.check_output(
[
"git",
"rev-parse",
"--verify",
"--end-of-options",
f"{ref}^{{commit}}",
],
cwd=ROOT,
text=True,
).strip()
verify_release(source, wheel, commit)
tracked = git_files(commit)
project = tomllib.loads(tracked["pyproject.toml"].decode())["project"]
version = project["version"].replace("rc", "~rc")
epoch = subprocess.check_output(
["git", "show", "-s", "--format=%ct", ref], cwd=ROOT, text=True
["git", "show", "-s", "--format=%ct", commit], cwd=ROOT, text=True
).strip()
output.mkdir(parents=True, exist_ok=True)
target = output / f"coulobre-panel_{version}_all.deb"