Message ID | 1404302808-11748-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
On 07/02/2014 05:06 AM, Luis Henriques wrote: > Add a new check to verify the closing tag has been pushed to the > repository. This will hopefully help preventing that a source package is > uploaded to the PPA before the source code is in the git repository. > > Signed-off-by: Luis Henriques <luis.henriques@canonical.com> > --- > maintscripts/verify-release-ready | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready > index ef24eb73ca49..a7125a8528ff 100755 > --- a/maintscripts/verify-release-ready > +++ b/maintscripts/verify-release-ready > @@ -4,7 +4,7 @@ > from argparse import ArgumentParser, RawDescriptionHelpFormatter > from logging import basicConfig, INFO, DEBUG > > -from ktl.utils import stdo, eout > +from ktl.utils import stdo, eout, run_command > from ktl.git import Git, GitError > from ktl.debian import Debian, DebianError > from ktl.kernel import Kernel, KernelError > @@ -290,7 +290,14 @@ class VerifyReleaseReady(): > if not tag_found: > s.status(msg, False) # the specified commit. > s.verbose("unable to find any tag that matched (%s) on the last commit " % (expected)) > - > + else: > + # Verify tag has been pushed! > + msg = 'tag pushed' > + status, result = run_command("git ls-remote --tags origin %s" % expected) > + if status == 0 and expected in result[0]: > + s.status(msg, True) > + else: > + s.status(msg, 'warning') > > def verify_content(s): > changelog = Debian.changelog() >
diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready index ef24eb73ca49..a7125a8528ff 100755 --- a/maintscripts/verify-release-ready +++ b/maintscripts/verify-release-ready @@ -4,7 +4,7 @@ from argparse import ArgumentParser, RawDescriptionHelpFormatter from logging import basicConfig, INFO, DEBUG -from ktl.utils import stdo, eout +from ktl.utils import stdo, eout, run_command from ktl.git import Git, GitError from ktl.debian import Debian, DebianError from ktl.kernel import Kernel, KernelError @@ -290,7 +290,14 @@ class VerifyReleaseReady(): if not tag_found: s.status(msg, False) # the specified commit. s.verbose("unable to find any tag that matched (%s) on the last commit " % (expected)) - + else: + # Verify tag has been pushed! + msg = 'tag pushed' + status, result = run_command("git ls-remote --tags origin %s" % expected) + if status == 0 and expected in result[0]: + s.status(msg, True) + else: + s.status(msg, 'warning') def verify_content(s): changelog = Debian.changelog()
Add a new check to verify the closing tag has been pushed to the repository. This will hopefully help preventing that a source package is uploaded to the PPA before the source code is in the git repository. Signed-off-by: Luis Henriques <luis.henriques@canonical.com> --- maintscripts/verify-release-ready | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)