Skip to content

Commit

Permalink
Add support for Upstream-Version-{Prefix,Suffix} (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
cottsay authored Nov 27, 2024
1 parent 8433314 commit 04f1148
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions publish_python/artifact/stdeb.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def create_deb(*, config):
key, value = env_var.split('=', 1)
add_env[key] = value
debinc = config_parser.get(pkg.name, 'Debian-Version', fallback='1')
debver = config_parser.get(pkg.name, 'Upstream-Version-Prefix', fallback='')
debver += pkg.version
debver += config_parser.get(pkg.name, 'Upstream-Version-Suffix', fallback='')

print(
'$', *cmd,
Expand All @@ -49,10 +52,10 @@ def create_deb(*, config):
os.unlink(tarball)

return {
f'deb_dist/{source_pkg_name}_{pkg.version}.orig.tar.gz',
f'deb_dist/{source_pkg_name}_{pkg.version}-{debinc}.debian.tar.gz',
f'deb_dist/{source_pkg_name}_{pkg.version}-{debinc}.dsc',
f'deb_dist/{source_pkg_name}_{pkg.version}-{debinc}_all.deb'}
f'deb_dist/{source_pkg_name}_{debver}.orig.tar.gz',
f'deb_dist/{source_pkg_name}_{debver}-{debinc}.debian.tar.gz',
f'deb_dist/{source_pkg_name}_{debver}-{debinc}.dsc',
f'deb_dist/{source_pkg_name}_{debver}-{debinc}_all.deb'}


def clean_deb():
Expand Down

0 comments on commit 04f1148

Please sign in to comment.