automatically adding versions
This commit is contained in:
11
.github/ISSUE_TEMPLATE/BUG.yml
vendored
11
.github/ISSUE_TEMPLATE/BUG.yml
vendored
@@ -29,14 +29,12 @@ body:
|
|||||||
- 0.1.0
|
- 0.1.0
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
|
||||||
id: steps_reproduce
|
id: steps_reproduce
|
||||||
attributes:
|
attributes:
|
||||||
label: Exact steps to reproduce this error
|
label: Exact steps to reproduce this error
|
||||||
description: Tell what completely exactly what you did to get this error.
|
description: Tell what completely exactly what you did to get this error.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
|
||||||
id: log
|
id: log
|
||||||
attributes:
|
attributes:
|
||||||
label: Log
|
label: Log
|
||||||
@@ -44,10 +42,8 @@ body:
|
|||||||
placeholder: https://mclo.gs/xyz
|
placeholder: https://mclo.gs/xyz
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: markdown
|
|
||||||
attributes:
|
attributes:
|
||||||
value: Either press on the share button in you modrinth launcher logs or paste it on https://mclo.gs/
|
value: Either press on the share button in you modrinth launcher logs or paste it on https://mclo.gs/
|
||||||
- type: textarea
|
|
||||||
id: additional
|
id: additional
|
||||||
attributes:
|
attributes:
|
||||||
label: Additional information
|
label: Additional information
|
||||||
@@ -55,13 +51,14 @@ body:
|
|||||||
placeholder: Anything else.
|
placeholder: Anything else.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
- type: checkboxes
|
|
||||||
id: reinstalling
|
id: reinstalling
|
||||||
attributes:
|
attributes:
|
||||||
label: Checks
|
label: Checks
|
||||||
description: Common mistakes (sorry btw)
|
description: Common mistakes (sorry btw)
|
||||||
options:
|
options:
|
||||||
- label: I tried reinstalling the modpack as a new instance or tried to fix it myself with other methods.
|
- 0.2.0
|
||||||
|
- 0.1.2
|
||||||
|
- 0.1.1
|
||||||
|
- 0.1.0
|
||||||
required: true
|
required: true
|
||||||
- label: I tried using a modrinth compatible launcher and did not just unpack the `.mrpack`.
|
|
||||||
required: true
|
required: true
|
||||||
|
29
release.py
29
release.py
@@ -10,6 +10,30 @@ def extract_version(filename):
|
|||||||
return (0, 0, 0)
|
return (0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
|
def update_bug_template(versions):
|
||||||
|
template_file = ".github/ISSUE_TEMPLATE/BUG.yml"
|
||||||
|
|
||||||
|
with open(template_file, "r") as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
|
||||||
|
updated_lines = []
|
||||||
|
in_options_section = False
|
||||||
|
|
||||||
|
for line in lines:
|
||||||
|
if "options:" in line:
|
||||||
|
in_options_section = True
|
||||||
|
updated_lines.append(line)
|
||||||
|
for version in versions:
|
||||||
|
updated_lines.append(f" - {version}\n")
|
||||||
|
elif in_options_section and line.strip().startswith("-"):
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
updated_lines.append(line)
|
||||||
|
|
||||||
|
with open(template_file, "w") as file:
|
||||||
|
file.writelines(updated_lines)
|
||||||
|
|
||||||
|
|
||||||
directory = "mrpack"
|
directory = "mrpack"
|
||||||
changelog_directory = "changelogs"
|
changelog_directory = "changelogs"
|
||||||
files = [f for f in os.listdir(directory) if f.endswith(".mrpack")]
|
files = [f for f in os.listdir(directory) if f.endswith(".mrpack")]
|
||||||
@@ -33,5 +57,10 @@ if len(files_sorted) > 1:
|
|||||||
)
|
)
|
||||||
|
|
||||||
print(f"Changelog generated: {changelog_directory}/{changelog_filename}")
|
print(f"Changelog generated: {changelog_directory}/{changelog_filename}")
|
||||||
|
|
||||||
|
versions = [".".join(map(str, extract_version(f))) for f in files_sorted]
|
||||||
|
update_bug_template(versions)
|
||||||
|
print(f"Updated .github/ISSUE_TEMPLATE/BUG.yml with versions: {versions}")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("Not enough .mrpack files found in the directory to generate a changelog.")
|
print("Not enough .mrpack files found in the directory to generate a changelog.")
|
||||||
|
Reference in New Issue
Block a user