Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions deploy-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
<plugin>
<groupId>io.github.ascopes</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>2.2.3</version>
<version>3.8.1</version>

<configuration>
<protocVersion>${protobuf.version}</protocVersion>
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading