Update release name for 2.10
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
This commit is contained in:
parent
832e03d932
commit
f58899eef7
5 changed files with 71 additions and 1 deletions
12
.github/RELEASE_NAMES.yml
vendored
Normal file
12
.github/RELEASE_NAMES.yml
vendored
Normal file
|
@ -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
|
|
@ -0,0 +1,4 @@
|
|||
Release names
|
||||
=============
|
||||
|
||||
Verifies that the most recent release name has been added to ``./github/RELEASE_NAMES.yml``
|
|
@ -21,4 +21,4 @@ __metaclass__ = type
|
|||
|
||||
__version__ = '2.10.0.dev0'
|
||||
__author__ = 'Ansible, Inc.'
|
||||
__codename__ = 'Immigrant Song'
|
||||
__codename__ = 'When the Levee Breaks'
|
||||
|
|
4
test/sanity/code-smell/release-names.json
Normal file
4
test/sanity/code-smell/release-names.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"no_targets": true,
|
||||
"output": "path-message"
|
||||
}
|
50
test/sanity/code-smell/release-names.py
Executable file
50
test/sanity/code-smell/release-names.py
Executable file
|
@ -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()
|
Loading…
Reference in a new issue