add bumper script
This commit is contained in:
parent
b7c0471602
commit
e6ae0104d0
1 changed files with 36 additions and 0 deletions
36
helpers/bumper.py
Executable file
36
helpers/bumper.py
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
import fileinput
|
||||
import os
|
||||
|
||||
"""
|
||||
This script is used to bump elasticsearch versions before a new release
|
||||
|
||||
Usage:
|
||||
- Change the values of `old_versions` and `new_versions``
|
||||
- Run the script: `./bumper.py`
|
||||
- That's all
|
||||
"""
|
||||
|
||||
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
old_versions = {
|
||||
6: '6.8.3',
|
||||
7: '7.4.0',
|
||||
}
|
||||
|
||||
new_versions = {
|
||||
6: '6.8.4',
|
||||
7: '7.4.1',
|
||||
}
|
||||
|
||||
files = [
|
||||
'README.md',
|
||||
'defaults/main.yml',
|
||||
'.kitchen.yml',
|
||||
]
|
||||
|
||||
for major, version in old_versions.items():
|
||||
for file in files:
|
||||
print(file)
|
||||
for line in fileinput.input([file], inplace=True):
|
||||
print(line.replace(version, new_versions[major]), end='')
|
||||
Loading…
Add table
Add a link
Reference in a new issue