@@ -52,7 +52,7 @@ def GetListOfArtifacts(argv, files):
52
52
if len (argv ) > 1 :
53
53
args += argv [1 :]
54
54
if len (args ) == 1 and args [0 ].lower () == "none" :
55
- print ("! Skipping 'files' because it's set to 'none" )
55
+ print ("! Skipping 'files' because it's set to 'none'. " )
56
56
return []
57
57
elif len (args ) == 0 :
58
58
stdout .flush ()
@@ -63,7 +63,7 @@ def GetListOfArtifacts(argv, files):
63
63
print (f" glob({ item !s} ):" )
64
64
for fname in [fname for fname in glob (item , recursive = True ) if not Path (fname ).is_dir ()]:
65
65
if Path (fname ).stat ().st_size == 0 :
66
- print (f" - ! Skipping empty file { fname !s} " )
66
+ print (f" - ! Skipping empty file { fname !s} . " )
67
67
continue
68
68
print (f" - { fname !s} " )
69
69
flist .append (fname )
@@ -101,7 +101,7 @@ def CheckRefSemVer(gh_ref, tag, snapshots):
101
101
return (tag , env_tag , False )
102
102
elif snapshots :
103
103
# is semver compilant prerelease tag, thus a snapshot (we skip it)
104
- print ("! Skipping snapshot prerelease" )
104
+ print ("! Skipping snapshot prerelease. " )
105
105
sys_exit ()
106
106
107
107
return (tag , env_tag , True )
@@ -179,12 +179,15 @@ def UpdateReference(gh_release, tag, sha, is_prerelease, is_draft):
179
179
asset .delete_asset ()
180
180
stdout .flush ()
181
181
182
- print ("· Cleanup and/or upload artifacts" )
183
- env = environ .copy ()
184
- env ["GITHUB_TOKEN" ] = paramToken
185
- cmd = ["gh" , "release" , "upload" , "--repo" , paramRepo , "--clobber" , tag ] + files
186
- print (f" > { ' ' .join (cmd )} " )
187
- check_call (cmd , env = env )
188
- stdout .flush ()
182
+ if len (files ) > 0 :
183
+ print ("· Upload assets" )
184
+ env = environ .copy ()
185
+ env ["GITHUB_TOKEN" ] = paramToken
186
+ cmd = ["gh" , "release" , "upload" , "--repo" , paramRepo , "--clobber" , tag ] + files
187
+ print (f" > { ' ' .join (cmd )} " )
188
+ check_call (cmd , env = env )
189
+ stdout .flush ()
190
+ else :
191
+ print ("! Skipping uploading assets because the file list is empty." )
189
192
190
193
UpdateReference (gh_release , tag , paramSHA if env_tag is None else None , is_prerelease , is_draft )
0 commit comments