mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 16:11:15 +00:00
lp-project-upload: Add support handling multiple project series.
This commit is contained in:
commit
992f710440
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,9 +1,13 @@
|
|||||||
ubuntu-dev-tools (0.105) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.105) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
[ Siegfried-Angel Gevatter Pujals ]
|
||||||
* pbuilder-dist, doc/pbuilder-dist.1:
|
* pbuilder-dist, doc/pbuilder-dist.1:
|
||||||
- Export the distribution and architecture information to the environment
|
- Export the distribution and architecture information to the environment
|
||||||
so that it is available in pbuilderrc, etc. (LP: #628933).
|
so that it is available in pbuilderrc, etc. (LP: #628933).
|
||||||
|
|
||||||
|
[ Naty Bidart ]
|
||||||
|
* lp-project-upload: Add support handling multiple project series.
|
||||||
|
|
||||||
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Sun, 26 Sep 2010 17:36:59 +0200
|
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Sun, 26 Sep 2010 17:36:59 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.104) experimental; urgency=low
|
ubuntu-dev-tools (0.104) experimental; urgency=low
|
||||||
|
@ -30,11 +30,30 @@ def create_release(project, version):
|
|||||||
answer = sys.stdin.readline().strip()
|
answer = sys.stdin.readline().strip()
|
||||||
if answer.startswith('n'):
|
if answer.startswith('n'):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
if len(proj.series) != 1:
|
|
||||||
print >> sys.stderr, 'Does not support creating releases if more than one series exists.'
|
n_series = len(proj.series)
|
||||||
|
if n_series == 1:
|
||||||
|
series = proj.series[0]
|
||||||
|
elif n_series > 1:
|
||||||
|
msg = 'More than one series exist. Which one would you like to ' \
|
||||||
|
'upload to? Possible series are (listed as index, name):'
|
||||||
|
print msg
|
||||||
|
for idx, serie in enumerate(proj.series):
|
||||||
|
print '\t%i - %s' % (idx, serie.name)
|
||||||
|
print 'Enter series index: '
|
||||||
|
answer = sys.stdin.readline().strip()
|
||||||
|
try:
|
||||||
|
series = proj.series[int(answer)]
|
||||||
|
except (ValueError, IndexError):
|
||||||
|
print >> sys.stderr, 'The series index is invalid (%s).' % answer
|
||||||
|
sys.exit(3)
|
||||||
|
else:
|
||||||
|
print "Using series named '%s'" % series.name
|
||||||
|
else:
|
||||||
|
print >> sys.stderr, 'Does not support creating releases if no series exists.'
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
release_date = datetime.date.today().strftime('%Y-%m-%d')
|
release_date = datetime.date.today().strftime('%Y-%m-%d')
|
||||||
series = proj.series[0]
|
|
||||||
milestone = series.newMilestone(name=version,
|
milestone = series.newMilestone(name=version,
|
||||||
date_targeted=release_date)
|
date_targeted=release_date)
|
||||||
return milestone.createProductRelease(date_released=release_date)
|
return milestone.createProductRelease(date_released=release_date)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user