mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-31 21:01:07 +00:00
lp-project-upload: Generate tarball signature if it is not present yet.
This commit is contained in:
parent
d97b54fc0a
commit
471fb39dbe
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -20,6 +20,9 @@ ubuntu-dev-tools (0.83) UNRELEASED; urgency=low
|
|||||||
- Add "--debug-echo" option which prints the resulting pbuilder/cowbuilder
|
- Add "--debug-echo" option which prints the resulting pbuilder/cowbuilder
|
||||||
commands instead of executing it.
|
commands instead of executing it.
|
||||||
|
|
||||||
|
[ Martin Pitt ]
|
||||||
|
* lp-project-upload: Generate tarball signature if it is not present yet.
|
||||||
|
|
||||||
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Tue, 17 Nov 2009 19:44:44 +0100
|
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Tue, 17 Nov 2009 19:44:44 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.82) lucid; urgency=low
|
ubuntu-dev-tools (0.82) lucid; urgency=low
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
'''Upload a release tarball to a Launchpad project.'''
|
'''Upload a release tarball to a Launchpad project.'''
|
||||||
|
|
||||||
import sys, datetime, os.path
|
import sys, datetime, os.path, subprocess
|
||||||
|
|
||||||
from ubuntutools.lp.libsupport import get_launchpad
|
from ubuntutools.lp.libsupport import get_launchpad
|
||||||
from launchpadlib.errors import HTTPError
|
from launchpadlib.errors import HTTPError
|
||||||
@ -73,10 +73,14 @@ try:
|
|||||||
file_content = open(tarball, 'r').read()
|
file_content = open(tarball, 'r').read()
|
||||||
# Get the signature, if available.
|
# Get the signature, if available.
|
||||||
signature = tarball + '.asc'
|
signature = tarball + '.asc'
|
||||||
|
if not os.path.exists(signature):
|
||||||
|
print 'Calling GPG to create tarball signature...'
|
||||||
|
if subprocess.call(['gpg', '--armor', '--sign', '--detach-sig', tarball]) != 0:
|
||||||
|
print >> sys.stderr, 'gpg failed, aborting'
|
||||||
|
|
||||||
if os.path.exists(signature):
|
if os.path.exists(signature):
|
||||||
signature_content = open(signature, 'r').read()
|
signature_content = open(signature, 'r').read()
|
||||||
else:
|
else:
|
||||||
print 'WARNING: no signature found (%s)' % signature
|
|
||||||
signature_content = None
|
signature_content = None
|
||||||
|
|
||||||
# Create a new product release file.
|
# Create a new product release file.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user