Build Debian artifacts directly from annotated release tags
This commit is contained in:
1 parent
165f3cf7db
commit
d9a85fd8d7
3 files changed
+26
-9
No files matched your search
@@ -66,6 +66,9 @@ jobs:
|
|||||||
python tools/check_core_release.py dist/*.tar.gz dist/*.whl
|
python tools/check_core_release.py dist/*.tar.gz dist/*.whl
|
||||||
python tools/build_deb.py dist/*.tar.gz dist/*.whl
|
python tools/build_deb.py dist/*.tar.gz dist/*.whl
|
||||||
umask 077
|
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
|
cmp dist/*.deb rebuilt/*.deb
|
||||||
dpkg-deb --info dist/*.deb
|
dpkg-deb --info dist/*.deb
|
||||||
+8
-5
@@ -145,22 +145,25 @@ and installs the selected operating system services and Python dependencies.
|
|||||||
### Use the Gitea APT repository
|
### Use the Gitea APT repository
|
||||||
|
|
||||||
Use the `resolute` suite on Ubuntu 26.04 or `trixie` on Debian 13. The `main`
|
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
|
component carries final releases. Use `candidate` on a test host to opt in to
|
||||||
test host to opt in to release candidates. A version like `0.13.0~rc1` sorts
|
release candidates. A version like `0.13.0~rc1` sorts before `0.13.0` in APT.
|
||||||
before `0.13.0` in APT.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
suite=resolute
|
suite=resolute
|
||||||
|
component=main
|
||||||
registry=https://code.hosting.hippogrief.nl/api/packages/hippogrief/debian
|
registry=https://code.hosting.hippogrief.nl/api/packages/hippogrief/debian
|
||||||
sudo install -d -m 0755 /etc/apt/keyrings
|
sudo install -d -m 0755 /etc/apt/keyrings
|
||||||
sudo curl -fsS "$registry/repository.key" -o /etc/apt/keyrings/hippogrief.asc
|
sudo curl -fsS "$registry/repository.key" -o /etc/apt/keyrings/hippogrief.asc
|
||||||
sudo chmod 0644 /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' \
|
printf 'deb [signed-by=/etc/apt/keyrings/hippogrief.asc] %s %s %s\n' \
|
||||||
"$registry" "$suite" | sudo tee /etc/apt/sources.list.d/hippogrief.list
|
"$registry" "$suite" "$component" | sudo tee /etc/apt/sources.list.d/hippogrief.list
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install coulobre-panel
|
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/)
|
[Gitea Debian registry documentation](https://docs.gitea.com/usage/packages/debian/)
|
||||||
|
|
||||||
### Upgrade an installer-managed panel
|
### Upgrade an installer-managed panel
|
||||||
|
|||||||
+14
-3
@@ -13,12 +13,23 @@ from check_core_release import ROOT, git_files, verify_release
|
|||||||
|
|
||||||
|
|
||||||
def build_package(source, wheel, ref, output):
|
def build_package(source, wheel, ref, output):
|
||||||
verify_release(source, wheel, ref)
|
commit = subprocess.check_output(
|
||||||
tracked = git_files(ref)
|
[
|
||||||
|
"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"]
|
project = tomllib.loads(tracked["pyproject.toml"].decode())["project"]
|
||||||
version = project["version"].replace("rc", "~rc")
|
version = project["version"].replace("rc", "~rc")
|
||||||
epoch = subprocess.check_output(
|
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()
|
).strip()
|
||||||
output.mkdir(parents=True, exist_ok=True)
|
output.mkdir(parents=True, exist_ok=True)
|
||||||
target = output / f"coulobre-panel_{version}_all.deb"
|
target = output / f"coulobre-panel_{version}_all.deb"
|
||||||
|
|||||||
Reference in new issue
Block a user