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,6 +57,7 @@ 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)
|
||||||
|
if license:
|
||||||
with open("LICENSE", "w") as file:
|
with open("LICENSE", "w") as file:
|
||||||
file.write(spdx.get(license)["text"])
|
file.write(spdx.get(license)["text"])
|
||||||
if not os.path.isdir(name):
|
if not os.path.isdir(name):
|
||||||
|
Loading…
Reference in New Issue
Block a user