-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a list of previously used release names to make it easy to tell what release names are no longer usable. Add a test that new release names have been added to the used list. Fixes #61616
- Loading branch information
Showing
5 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
- 2.10.0 When the Levee Breaks | ||
- 2.9.0 Immigrant Song | ||
- 2.8.0 How Many More Times | ||
- 2.7.0 In the Light | ||
- 2.6.0 Heartbreaker | ||
- 2.5.0 Kashmir | ||
- 2.4.0 Dancing Days | ||
- 2.3.0 Ramble On | ||
- 2.2.0 The Battle of Evermore | ||
- 2.1.0 The Song Remains the Same | ||
- 2.0.0 Over the Hills and Far Away |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Release names | ||
============= | ||
|
||
Verifies that the most recent release name has been added to ``./github/RELEASE_NAMES.yml`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"no_targets": true, | ||
"output": "path-message" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# (c) 2019, Ansible Project | ||
# | ||
# This file is part of Ansible | ||
# | ||
# Ansible is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Ansible is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. | ||
""" | ||
Test that the release name is present in the list of used up release names | ||
""" | ||
|
||
|
||
from __future__ import (absolute_import, division, print_function) | ||
__metaclass__ = type | ||
|
||
from yaml import safe_load | ||
|
||
from ansible.release import __codename__ | ||
|
||
|
||
def main(): | ||
"""Entrypoint to the script""" | ||
|
||
with open('.github/RELEASE_NAMES.yml') as f: | ||
releases = safe_load(f.read()) | ||
|
||
# Why this format? The file's sole purpose is to be read by a human when they need to know | ||
# which release names have already been used. So: | ||
# 1) It's easier for a human to find the release names when there's one on each line | ||
# 2) It helps keep other people from using the file and then asking for new features in it | ||
for name in (r.split(maxsplit=1)[1] for r in releases): | ||
if __codename__ == name: | ||
break | ||
else: | ||
print('.github/RELEASE_NAMES.yml: Current codename was not present in the file') | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |