Browse Source

fixed a wrong help message

master
Holger Frey 3 years ago
parent
commit
39878a9fb4
  1. 12
      work_helpers/sg_mbp_release.py

12
work_helpers/sg_mbp_release.py

@ -18,7 +18,8 @@ CRLF = "\r\n"
EXCEL_CHANGELOGS = { EXCEL_CHANGELOGS = {
"changes mbp {version} hyb.txt": "J1", "changes mbp {version} hyb.txt": "J1",
"changes mbp {version} qc.txt": "J1", "changes mbp {version} qc.txt": "J1",
"changes mbp {version} dry.txt": "L1", "changes mbp {version} dry-1.txt": "L1",
"changes mbp {version} dry-2.txt": "L1",
"changes mbp {version} reg.txt": "J1", "changes mbp {version} reg.txt": "J1",
} }
@ -32,7 +33,8 @@ WORKBOOKS_MAP = {
"MBP Hyb.xlsx": "MBP {version} Hyb.xlsx", "MBP Hyb.xlsx": "MBP {version} Hyb.xlsx",
"MBP Reg.xlsx": "MBP {version} Reg.xlsx", "MBP Reg.xlsx": "MBP {version} Reg.xlsx",
"MBP QC.xlsx": "MBP {version} QC.xlsx", "MBP QC.xlsx": "MBP {version} QC.xlsx",
"MBP Dry.xlsx": "MBP {version} Dry.xlsx", "MBP Dry-1.xlsx": "MBP {version} Dry-1.xlsx",
"MBP Dry-2.xlsx": "MBP {version} Dry-2.xlsx",
} }
@ -121,7 +123,9 @@ def copy_workbook_changelogs(destination, latest, release_version):
def copy_workbooks(destination, release_version): def copy_workbooks(destination, release_version):
for excel_file in _files_in_folder(PATH_WORKBOOKS, ".xlsx"): all_xls_files = _files_in_folder(PATH_WORKBOOKS, ".xlsx")
mbp_files = (f for f in all_xls_files if f.name.lower().startswith("mbp"))
for excel_file in mbp_files:
new_name = WORKBOOKS_MAP[excel_file.name] new_name = WORKBOOKS_MAP[excel_file.name]
new_path = destination / new_name.format(version=release_version) new_path = destination / new_name.format(version=release_version)
print(excel_file.name, "->", new_path) print(excel_file.name, "->", new_path)
@ -153,7 +157,7 @@ def sg_mbp_new_version(version):
@click.option( @click.option(
"-d", "-d",
"--dev_version", "--dev_version",
prompt="Formula + Dev version i.e. '.4c'", prompt="Dev version i.e. 'c'",
required=True, required=True,
default="", default="",
) )

Loading…
Cancel
Save