Skip to content

Commit

Permalink
install: Catch version errors when building DEBs
Browse files Browse the repository at this point in the history
Make sure that the Debian package we build conforms to the expected
naming scheme else, it's possible that something is off. A scenario
we've encountered is bumping `share/version.txt`, but not
`debian/changelog`, which would create a Debian package with an older
version.
  • Loading branch information
apyrgio authored and almet committed Oct 2, 2024
1 parent a32522f commit eb2d114
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions install/linux/build-deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ def main():

# dpkg-buildpackage produces a .deb file in the parent folder
# that needs to be copied to the `deb_dist` folder manually
for item in root.parent.glob(f"dangerzone_{version}_*.deb"):
arch = item.stem.split("_")[-1]
destination = root / "deb_dist" / f"dangerzone_{version}-{deb_ver}_{arch}.deb"
shutil.move(item, destination)
print(f"sudo dpkg -i {destination}")
src = root.parent / f"dangerzone_{version}_amd64.deb"
destination = root / "deb_dist" / f"dangerzone_{version}-{deb_ver}_amd64.deb"
shutil.move(src, destination)
print(f"sudo dpkg -i {destination}")


if __name__ == "__main__":
Expand Down

0 comments on commit eb2d114

Please sign in to comment.