silnrsi / smith

font development, testing and release
Other
14 stars 5 forks source link

Filenames of zip pacakges are constructed differently for main and addl packages #70

Open jvgaultney opened 2 years ago

jvgaultney commented 2 years ago

The non-release filenames for zip and tar.gz package for normal one-package projects seem to be constructed this way:

appname-[buildlabel]-version-hash.zip (LisuBosaTestE-1.950--dev-7e1d1e.zip)

If there is no buildlabel you end up with two hyphens. Note that we have said that current best practice is to no longer use BUILDLABEL in wscript, so it should no longer exist anyway (for up-to-date projects).

For any additional packages defined using package() and package= you only get one hyphen. This is the case with both font-lisu-bosa and font-shimenkan.

It would be good for these filenames to be more consistent, and for Smith to use only one hyphen, adding the additional one only when there is BUILDLABEL.

n7s commented 2 years ago

@mhosken would the following do the job?

+++ /home/nico/repos/smith-master/smithlib/package.py
@@ -88,6 +88,7 @@
                 bv = getversion(buildformat=kw['buildformat'])
             if 'buildlabel' in kw and bv != '':
                 bv = kw['buildlabel'] + " " + bv
+                bv = kw['buildlabel'].replace(" ", "-")
             kw['buildversion'] = bv
         bv = kw['buildversion'].replace(" ", "-")
         if 'sile_path' not in kw:
@@ -368,7 +369,7 @@

     def get_basearc(self, extras="") :
         if self.buildversion != '' :
-            return "{0.appname}{1}-{0.version}-{2}".format(self, extras, self.buildversion.replace(" ", "-"))
+            return "{0.appname}{1}-{0.version}-{2}".format(self, extras, self.buildversion.replace(" ", ""))
         else :
             return "{0.appname}{1}-{0.version}".format(self, extras)