Skip to content

Commit

Permalink
Merge pull request #25 from g-aggarwal/deployment
Browse files Browse the repository at this point in the history
Complete deployment file
  • Loading branch information
g-aggarwal authored Jul 24, 2024
2 parents 1992d40 + 11ae73d commit 0e01715
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
#!/bin/bash

deployment_environment="test"
venv_dir="venv_deploy"
repo="testpypi" # Default repository is TestPyPI

# Check if the script is being sourced
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "Error: This script should be sourced, not executed."
echo "Usage: source ${BASH_SOURCE[0]}"
exit 1
fi

echo "Sourcing the script..."

# Function to check command success
check_command() {
if [ $? -ne 0 ]; then
echo "Error: $1 failed"
exit 1
fi
}

# Determine the repository based on the argument
if [ -n "$1" ] && [ "$1" = "--prod" ]; then
deployment_environment="prod"
repo="pypi"
else
deployment_environment="test"
repo="testpypi"


fi

echo "Environment: $deployment_environment"
Expand Down

0 comments on commit 0e01715

Please sign in to comment.