Kaynağa Gözat

update build.py

omassot 6 yıl önce
ebeveyn
işleme
cdbfa8432a
1 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. 5 4
      build.py

+ 5 - 4
build.py

@@ -17,7 +17,8 @@ build_dir.mkdir_p()
 
 version = constants.VERSION
 
-pluginname = "mncheck"
+pluginname = "MnCheck"
+libname = pluginname.lower()
 name = "{}_v{}.zip".format(pluginname, version.replace(".", "-"))
 
 config = configparser.ConfigParser()
@@ -48,7 +49,7 @@ with ZipFile(build_dir / name, 'w', ZIP_DEFLATED, 9) as zip_:
         if p.ext == ".pyc":
             return
         if not arcname:
-            arcname = ("{}/{}".format(pluginname, p.relpath(constants.MAIN)).replace("\\", "/"))
+            arcname = ("{}/{}".format(libname, p.relpath(constants.MAIN)).replace("\\", "/"))
         print(arcname)
         zip_.write(p, arcname)
 
@@ -75,8 +76,8 @@ with ZipFile(build_dir / name, 'w', ZIP_DEFLATED, 9) as zip_:
     _zip_write(constants.MAIN / "icon.png")
     _zip_write(constants.MAIN / "metadata.txt")
     
-    _zip_write(HERE / "README.md", f"{pluginname}/README.md")
-    _zip_write(HERE / "LICENSE", f"{pluginname}/LICENSE")
+    _zip_write(HERE / "README.md", f"{libname}/README.md")
+    _zip_write(HERE / "LICENSE", f"{libname}/LICENSE")
     
 Path(build_dir / "metadata.txt").remove_p()