Fix license in mbc iit
This commit is contained in:
parent
f548e17c80
commit
3068245b1f
@ -76,7 +76,7 @@ class VersionValidator(ClickValidator):
|
|||||||
|
|
||||||
|
|
||||||
def spdx(val: str) -> str:
|
def spdx(val: str) -> str:
|
||||||
if spdxlib.valid(val):
|
if not spdxlib.valid(val):
|
||||||
raise click.BadParameter(f"{val} is not a valid SPDX license identifier")
|
raise click.BadParameter(f"{val} is not a valid SPDX license identifier")
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
@ -57,8 +57,9 @@ def init(name: str, id: str, version: Version, license: str, config: bool) -> No
|
|||||||
main_class=main_class)
|
main_class=main_class)
|
||||||
with open("maubot.yaml", "w") as file:
|
with open("maubot.yaml", "w") as file:
|
||||||
file.write(meta)
|
file.write(meta)
|
||||||
with open("LICENSE", "w") as file:
|
if license:
|
||||||
file.write(spdx.get(license)["text"])
|
with open("LICENSE", "w") as file:
|
||||||
|
file.write(spdx.get(license)["text"])
|
||||||
if not os.path.isdir(name):
|
if not os.path.isdir(name):
|
||||||
os.mkdir(name)
|
os.mkdir(name)
|
||||||
mod = mod_template.render(config=config, name=main_class)
|
mod = mod_template.render(config=config, name=main_class)
|
||||||
|
Loading…
Reference in New Issue
Block a user