diff options
author | Jake Buchholz <tomalok@gmail.com> | 2019-07-13 10:12:40 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2019-07-14 09:07:01 -0700 |
commit | 0f1cc5c4b2ebdb50c145c2708ee7b41f35ea64f9 (patch) | |
tree | 83e835396a67fc596494a9073ca0f77ad89af56a | |
parent | b4baa30e52d5115102470ad49e04b102a3c559ff (diff) | |
download | alpine-ec2-ami-0f1cc5c4b2ebdb50c145c2708ee7b41f35ea64f9.tar.bz2 alpine-ec2-ami-0f1cc5c4b2ebdb50c145c2708ee7b41f35ea64f9.tar.xz alpine-ec2-ami-0f1cc5c4b2ebdb50c145c2708ee7b41f35ea64f9.zip |
Latest AMIs per Version in releases/README.md
Only keep the latest AMIs per version in releases/README.md instead of per release.
-rw-r--r-- | releases/README.md | 24 | ||||
-rw-r--r-- | scripts/gen-release-readme.py.in | 40 |
2 files changed, 22 insertions, 42 deletions
diff --git a/releases/README.md b/releases/README.md index d1f923c..7955ac3 100644 --- a/releases/README.md +++ b/releases/README.md | |||
@@ -52,30 +52,6 @@ important to you, please open an [issue](https://github.com/mcrute/alpine-ec2-am | |||
52 | 52 | ||
53 | </p></details> | 53 | </p></details> |
54 | 54 | ||
55 | ### Alpine Linux 3.10.0 (2019-06-20) | ||
56 | <details><summary><i>click to show/hide</i></summary><p> | ||
57 | |||
58 | | Region | alpine-ami-3.10.0-x86_64-r0 | | ||
59 | | ------ | --- | | ||
60 | | ap-northeast-1 | [ami-00d72ba9e4e50e6f0](https://ap-northeast-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-00d72ba9e4e50e6f0) ([launch](https://ap-northeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-00d72ba9e4e50e6f0)) | | ||
61 | | ap-northeast-2 | [ami-0b2ab59439d69c87f](https://ap-northeast-2.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0b2ab59439d69c87f) ([launch](https://ap-northeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-0b2ab59439d69c87f)) | | ||
62 | | ap-south-1 | [ami-06ab2e1b19df43403](https://ap-south-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-06ab2e1b19df43403) ([launch](https://ap-south-1.console.aws.amazon.com/ec2/home#launchAmi=ami-06ab2e1b19df43403)) | | ||
63 | | ap-southeast-1 | [ami-097e487f602370726](https://ap-southeast-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-097e487f602370726) ([launch](https://ap-southeast-1.console.aws.amazon.com/ec2/home#launchAmi=ami-097e487f602370726)) | | ||
64 | | ap-southeast-2 | [ami-0f2248216c030f2ea](https://ap-southeast-2.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0f2248216c030f2ea) ([launch](https://ap-southeast-2.console.aws.amazon.com/ec2/home#launchAmi=ami-0f2248216c030f2ea)) | | ||
65 | | ca-central-1 | [ami-035f9ddc53b8e3c94](https://ca-central-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-035f9ddc53b8e3c94) ([launch](https://ca-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-035f9ddc53b8e3c94)) | | ||
66 | | eu-central-1 | [ami-0c2583ed13862fb17](https://eu-central-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0c2583ed13862fb17) ([launch](https://eu-central-1.console.aws.amazon.com/ec2/home#launchAmi=ami-0c2583ed13862fb17)) | | ||
67 | | eu-north-1 | [ami-069c11c7844825375](https://eu-north-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-069c11c7844825375) ([launch](https://eu-north-1.console.aws.amazon.com/ec2/home#launchAmi=ami-069c11c7844825375)) | | ||
68 | | eu-west-1 | [ami-076b4d480f72a117f](https://eu-west-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-076b4d480f72a117f) ([launch](https://eu-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-076b4d480f72a117f)) | | ||
69 | | eu-west-2 | [ami-0a5d209eea58688c2](https://eu-west-2.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0a5d209eea58688c2) ([launch](https://eu-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-0a5d209eea58688c2)) | | ||
70 | | eu-west-3 | [ami-0385dc3d759aaa464](https://eu-west-3.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0385dc3d759aaa464) ([launch](https://eu-west-3.console.aws.amazon.com/ec2/home#launchAmi=ami-0385dc3d759aaa464)) | | ||
71 | | sa-east-1 | [ami-04ddd371cd342921d](https://sa-east-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-04ddd371cd342921d) ([launch](https://sa-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-04ddd371cd342921d)) | | ||
72 | | us-east-1 | [ami-0647412cf72f247d9](https://us-east-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0647412cf72f247d9) ([launch](https://us-east-1.console.aws.amazon.com/ec2/home#launchAmi=ami-0647412cf72f247d9)) | | ||
73 | | us-east-2 | [ami-0fb394548acf15691](https://us-east-2.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0fb394548acf15691) ([launch](https://us-east-2.console.aws.amazon.com/ec2/home#launchAmi=ami-0fb394548acf15691)) | | ||
74 | | us-west-1 | [ami-04d80966c446c3f58](https://us-west-1.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-04d80966c446c3f58) ([launch](https://us-west-1.console.aws.amazon.com/ec2/home#launchAmi=ami-04d80966c446c3f58)) | | ||
75 | | us-west-2 | [ami-0c71a8664131b42b3](https://us-west-2.console.aws.amazon.com/ec2/home#Images:visibility=public-images;imageId=ami-0c71a8664131b42b3) ([launch](https://us-west-2.console.aws.amazon.com/ec2/home#launchAmi=ami-0c71a8664131b42b3)) | | ||
76 | |||
77 | </p></details> | ||
78 | |||
79 | ### Alpine Linux 3.9.4 (2019-06-20) | 55 | ### Alpine Linux 3.9.4 (2019-06-20) |
80 | <details><summary><i>click to show/hide</i></summary><p> | 56 | <details><summary><i>click to show/hide</i></summary><p> |
81 | 57 | ||
diff --git a/scripts/gen-release-readme.py.in b/scripts/gen-release-readme.py.in index 764869d..679d4f3 100644 --- a/scripts/gen-release-readme.py.in +++ b/scripts/gen-release-readme.py.in | |||
@@ -30,26 +30,29 @@ sections = {} | |||
30 | 30 | ||
31 | for build, releases in RELEASES.items(): | 31 | for build, releases in RELEASES.items(): |
32 | for release, amis in releases.items(): | 32 | for release, amis in releases.items(): |
33 | if release in sections: | ||
34 | rel = sections[release] | ||
35 | else: | ||
36 | rel = { | ||
37 | 'built': {}, | ||
38 | 'name': {}, | ||
39 | 'ami': {} | ||
40 | } | ||
41 | for name, info in amis.items(): | 33 | for name, info in amis.items(): |
34 | version = info['version'] | ||
42 | arch = info['arch'] | 35 | arch = info['arch'] |
43 | built = info['build_time'] | 36 | built = info['build_time'] |
44 | if (arch not in rel['built'] or | 37 | if version in sections: |
45 | rel['built'][arch] < built): | 38 | ver = sections[version] |
46 | rel['name'][arch] = name | 39 | else: |
47 | rel['built'][arch] = built | 40 | ver = { |
41 | 'release': '', | ||
42 | 'built': {}, | ||
43 | 'name': {}, | ||
44 | 'ami': {} | ||
45 | } | ||
46 | if (arch not in ver['built'] or | ||
47 | ver['built'][arch] < built): | ||
48 | ver['release'] = release | ||
49 | ver['name'][arch] = name | ||
50 | ver['built'][arch] = built | ||
48 | for region, ami in info['artifacts'].items(): | 51 | for region, ami in info['artifacts'].items(): |
49 | if region not in rel['ami']: | 52 | if region not in ver['ami']: |
50 | rel['ami'][region] = {} | 53 | ver['ami'][region] = {} |
51 | rel['ami'][region][arch] = ami | 54 | ver['ami'][region][arch] = ami |
52 | sections[release] = rel | 55 | sections[version] = ver |
53 | 56 | ||
54 | SECTION = """ | 57 | SECTION = """ |
55 | ### Alpine Linux {release} ({date}) | 58 | ### Alpine Linux {release} ({date}) |
@@ -85,8 +88,9 @@ def ver_cmp(a, b): | |||
85 | 88 | ||
86 | ami_list = "## AMIs\n" | 89 | ami_list = "## AMIs\n" |
87 | 90 | ||
88 | for release in sorted(list(sections.keys()), key=functools.cmp_to_key(ver_cmp)): | 91 | for version in sorted(list(sections.keys()), key=functools.cmp_to_key(ver_cmp)): |
89 | info = sections[release] | 92 | info = sections[version] |
93 | release = info['release'] | ||
90 | rows = [] | 94 | rows = [] |
91 | rows.append('| Region |') | 95 | rows.append('| Region |') |
92 | rows.append('| ------ |') | 96 | rows.append('| ------ |') |