From f8f4f1de28a58951d95f9a4960af57e3cfa5c11a Mon Sep 17 00:00:00 2001 From: iimpulse Date: Tue, 9 Sep 2025 09:36:36 -0600 Subject: [PATCH 1/3] update deploy script to be more resilient --- deploy-python.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy-python.sh b/deploy-python.sh index 27e303a..5922792 100755 --- a/deploy-python.sh +++ b/deploy-python.sh @@ -13,13 +13,13 @@ cd $DIRECTORY || { echo "Deployment FAILED. Couldn't find directory" ; exit 1; } createVirtualEnvironment(){ echo "Creating Python virtual environment at ${1}" python3 -m venv "${1}" &> /dev/null - if [ ${?} = 1 ]; then + if [ $? -ne 0 ]; then echo "Setup of Python virtual environment using 'python3 -m venv' failed. Trying 'virtualenv'" virtualenv "${1}" &> /dev/null - fi - if [ ${?} = 1 ]; then - echo "Deployment FAILED. Could not create Python virtual environment" - exit 1; + if [ $? -ne 0 ]; then + echo "Deployment FAILED. Could not create Python virtual environment" + exit 1; + fi fi echo "Virtual environment created successfully"; } @@ -40,9 +40,9 @@ python3 -m pip install build twine || { echo "Deployment FAILED. Failed to insta python3 -m build || { echo "Deployment FAILED. Building python package" ; exit 1; } # Deploy - Remove --repository testpypi flag for production. if [ "$1" = "release-prod" ]; then - python3 -m twine upload dist/* + python3 -m twine upload dist/* || { echo "Deployment FAILED. Could not upload."; exit 1; } elif [ "$1" = "release-test" ]; then - python3 -m twine upload --repository testpypi dist/* + python3 -m twine upload --repository testpypi dist/* || { echo "Deployment FAILED. Could not upload."; exit 1; } else echo "Python Release was prepared successfully. No release argument provided, use one of [release-prod, release-test] to make the production/test release." fi @@ -52,4 +52,4 @@ echo "Cleaning up the build environment and the build files" deactivate rm -rf build dist ${TEMP_DIRECTORY_VIRTUAL_ENV} cd .. -./mvnw clean +./mvnw clean \ No newline at end of file From 0578a1d72dd64d5fce34e5cb2d4b204c5cc6a9b2 Mon Sep 17 00:00:00 2001 From: iimpulse Date: Tue, 9 Sep 2025 09:37:23 -0600 Subject: [PATCH 2/3] update protobuf plugin --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf8d7d4..fc3d06b 100644 --- a/pom.xml +++ b/pom.xml @@ -174,7 +174,7 @@ io.github.ascopes protobuf-maven-plugin - 2.2.3 + 3.8.1 ${protobuf.version} From 84bca6b3a26e5078bfa90cc79c2ad544a4d3a744 Mon Sep 17 00:00:00 2001 From: iimpulse Date: Tue, 9 Sep 2025 09:37:53 -0600 Subject: [PATCH 3/3] bring python version to current deployed --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 2d93b9e..600b4d0 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "phenopackets" -version = "2.0.2.post2" # IMPORTANT: This must be kept in sync with `project.version` in the top-level `pom.xml` +version = "2.0.2.post5" # IMPORTANT: This must be kept in sync with `project.version` in the top-level `pom.xml` requires-python = ">=3.8" description = "Phenopacket Schema" readme = "README.rst"