@@ -20,7 +20,7 @@ def tag(version, dryrun=False, kind=None):
2020 print ("Would tag: {}" .format (tag ))
2121 else :
2222 subprocess .run (['git' , 'tag' , tag ])
23- subprocess .run (['git' , 'push' , 'origin ' , tag ])
23+ subprocess .run (['git' , 'push' , 'upstream ' , tag ])
2424
2525def pypi (wheel = True , test = False ):
2626 """release on pypi
@@ -51,11 +51,18 @@ def npmjs(dryrun=False):
5151
5252def labExtensionVersion (dryrun = False , version = None ):
5353 if version :
54+ if 'rc' in version :
55+ version ,rc = version .split ('rc' )
56+ version = version + '-rc.{}' .format (rc )
57+
5458 force_ver_cmd = ['npm' , '--no-git-tag-version' , 'version' , version , '--force' , '--allow-same-version' ]
59+ force_ver_info = ' ' .join (force_ver_cmd )
60+
5561 if dryrun :
56- print ("Would force npm version with: {}" .format (' ' . join ( force_ver_cmd ) ))
62+ print ("Would force npm version with: {}" .format (force_ver_info ))
5763 else :
5864 # force the labextension version to match the supplied version
65+ print ("> {}" .format (force_ver_info ))
5966 subprocess .run (force_ver_cmd )
6067 else :
6168 # get single source of truth from the Typescript labextension
@@ -71,17 +78,17 @@ def serverExtensionVersion():
7178 return get_version (VERSION_PY )
7279
7380def doRelease (test = False ):
74- # prep the build area for the labextension bundle
75- prepLabextensionBundle ()
76-
7781 # treat the serverextension version as the "real" single source of truth
7882 version = serverExtensionVersion ()
7983 # force the labextension version to agree with the serverextension version
80- labExtensionVersion (dryrun = test , version = version )
84+ labExtensionVersion (version = version )
8185
8286 # tag with version and push the tag
8387 tag (dryrun = test , version = version )
8488
89+ # prep the build area for the labextension bundle
90+ prepLabextensionBundle ()
91+
8592 # release to pypi and npmjs
8693 pypi (test = test )
8794 npmjs (dryrun = test )
0 commit comments