@@ -92,6 +92,8 @@ def validate_dependencies() -> None:
9292 raise DependencyException ("Please install yarn https://classic.yarnpkg.com/" )
9393 if not dependency_exists ("twine" ):
9494 raise DependencyException ("Please install twine https://twine.readthedocs.io/en/latest/#installation" )
95+ if not dependency_exists ("pip-compile" ):
96+ raise DependencyException ("Please install pip-tools https://pypi.org/project/pip-tools/" )
9597
9698
9799def validate_environment () -> None :
@@ -102,6 +104,8 @@ def validate_environment() -> None:
102104def update_version_to_release () -> None :
103105 global config
104106
107+ print (f"Updating documentation to Release v{ config .new_version } " )
108+
105109 old_version = config .old_version
106110 old_npm_version = config .old_npm_version
107111 new_version = config .new_version
@@ -258,6 +262,8 @@ def update_version_to_release() -> None:
258262 )
259263 check_run (["yarn" , "version" , "--new-version" , new_npm_version , "--no-git-tag-version" ], cwd = config .source_dir )
260264
265+ print (f"Finished updating documentation to Release v{ config .new_version } " )
266+
261267 except Exception as ex :
262268 raise UpdateVersionException from ex
263269
@@ -500,6 +506,14 @@ def build_server():
500506 print ("" )
501507
502508
509+ def create_requirements_lockfile ():
510+ print ("-----------------------------------------------------------------" )
511+ print ("--------------------- Creating Lockfile -------------------------" )
512+ print ("-----------------------------------------------------------------" )
513+ check_run (["pip-compile" , "--generate-hashes" , "pyproject.toml" ], cwd = config .source_dir , capture_output = False )
514+ check_run (["git" , "add" , "requirements.txt" ], cwd = config .source_dir , capture_output = False )
515+
516+
503517def show_release_artifacts ():
504518 global config
505519 dist_dir = os .path .join (config .source_dir , "dist" )
@@ -734,7 +748,7 @@ def prepare_changelog() -> None:
734748 generate_changelog ()
735749 # commit
736750 check_run (
737- ["git" , "commit" , "-a" , "-m" , f"Update changelog for release { config .new_version } " ], cwd = config .source_dir
751+ ["git" , "commit" , "-a" , "-s" , "- m" , f"Update changelog for release { config .new_version } " ], cwd = config .source_dir
738752 )
739753
740754
@@ -750,11 +764,16 @@ def prepare_release() -> None:
750764 checkout_code ()
751765 # generate changelog with new release list of commits
752766 prepare_changelog ()
767+ # create requirements lock file
768+ create_requirements_lockfile ()
753769 # Update to new release version
754770 update_version_to_release ()
755771 # commit and tag
756- check_run (["git" , "commit" , "-a" , "-m" , f"Release v{ config .new_version } " ], cwd = config .source_dir )
757- check_run (["git" , "tag" , config .tag ], cwd = config .source_dir )
772+ print (f"Committing changes for release v{ config .new_version } " )
773+ check_run (["git" , "commit" , "-a" , "-s" , "-m" , f"Release v{ config .new_version } " ], cwd = config .source_dir )
774+ # Ensure you have tags.gpgSign set to True and user.signingkey configured via git config
775+ print (f"Creating tag for release v{ config .new_version } " )
776+ check_run (["git" , "tag" , config .tag , "-m" , f"Release v{ config .new_version } " ], cwd = config .source_dir )
758777 # server-only wheel
759778 build_server ()
760779 # build release wheel and npm artifacts
@@ -764,7 +783,7 @@ def prepare_release() -> None:
764783 # back to development
765784 update_version_to_dev ()
766785 # commit
767- check_run (["git" , "commit" , "-a" , "-m" , f"Prepare for next development iteration" ], cwd = config .source_dir )
786+ check_run (["git" , "commit" , "-a" , "-s" , "- m" , f"Prepare for next development iteration" ], cwd = config .source_dir )
768787 # prepare extensions
769788 prepare_extensions_release ()
770789 # prepare runtime extsnsions
0 commit comments