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
+14
-3
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user