~landscape/landscape-bundles/trunk

« back to all changes in this revision

Viewing changes to update-charm-revisions

  • Committer: Simon Poirier
  • Date: 2021-07-23 20:50:59 UTC
  • mfrom: (54.1.1 bumpitty-bump)
  • Revision ID: simon.poirier@canonical.com-20210723205059-jfgm23dnspcmg2b7
Merge bumpitty-bump [f=] [r=maxiberta] [a=Simon Poirier]
Fix update-charm-revisions regexp to match current charm Id scheme and bump charms revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    be tested and checked in if successful.
52
52
 
53
53
    Look for lines like:
54
 
      charm: cs:trusty/juju-gui-83
 
54
      charm: cs:juju-gui-83
55
55
 
56
56
    Or:
57
57
      series: trusty
60
60
        pattern = "^(\s*)series:\s.*$"
61
61
        line = re.sub(pattern, r"\1series: %s" % series, line)
62
62
        for charm in charms:
63
 
            pattern = "cs:[^/]+/{}-[0-9]+".format(charm.name)
 
63
            pattern = "cs:{}-[0-9]+".format(charm.name)
64
64
            line = re.sub(pattern, charm.store_url, line)
65
65
        sys.stdout.write(line)
66
66