Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:fix-single-element-versions into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Bryce Harrington
Status: Merged
Merged at revision: f909af3542cb123c4f62ab8bab836a021fd302ef
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:fix-single-element-versions
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 28 lines (+4/-2)
2 files modified
templates/README_DOCKERHUB.md (+2/-1)
templates/README_DOCKERHUB_LTS.md (+2/-1)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior Approve
Canonical Server Pending
Review via email: mp+399691@code.launchpad.net

Description of the change

Modify templates to be able to handle single-element versions, e.g. postgres:12-20.04.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Ops, there are conflicts in the diff below.

From what I'm seeing the code LGTM, but just to be safe I think it's better to rebase the branch against master (there's one extra change on line 8 from README_DOCKERHUB.md which I'm not sure is intended). Thanks.

review: Needs Fixing
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, I've updated the branch. I hadn't noticed that my checkout was out of date; guess it's good that the Makefile wgets the templates.

The line 8 change was just removing trailing whitespace from the line, but I've restored that to minimize this change.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Ah, awesome. Thanks man, +1 from me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/templates/README_DOCKERHUB.md b/templates/README_DOCKERHUB.md
2index c05871a..e66ca40 100644
3--- a/templates/README_DOCKERHUB.md
4+++ b/templates/README_DOCKERHUB.md
5@@ -4,7 +4,8 @@ Current ${application} Docker Image from Ubuntu. Receives security updates and r
6 <%
7 baserepo='ubuntu'
8 distroversion=base.strip('Ubuntu').strip('LTS').lstrip().rstrip()
9- pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-'+distroversion+'_'
10+ swver='.'.join(version.split(".")[:2])
11+ pretag=swver+'-'+distroversion+'_'
12 tag=pretag+'beta'
13 %>
14 <%include file="header.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>
15diff --git a/templates/README_DOCKERHUB_LTS.md b/templates/README_DOCKERHUB_LTS.md
16index 4ae13f0..fadeee9 100644
17--- a/templates/README_DOCKERHUB_LTS.md
18+++ b/templates/README_DOCKERHUB_LTS.md
19@@ -5,7 +5,8 @@ The [LTS Docker Image Portfolio](https://ubuntu.com/security/docker-images) are
20 <%
21 baserepo='lts'
22 distroversion=base.strip('Ubuntu').strip('LTS').lstrip().rstrip()
23- pretag=version.split(".")[0]+'.'+version.split(".")[1]+'-'+distroversion+'_'
24+ swver='.'.join(version.split(".")[:2])
25+ pretag=swver+'-'+distroversion+'_'
26 tag=pretag+'beta'
27 %>
28 <%include file="header.md" args="tag=tag, pretag=pretag, baserepo=baserepo, **locals()['pageargs']"/>

Subscribers

People subscribed via source and target branches

to all changes: