plugin-twine/plugin.sh

23 lines
468 B
Bash
Executable File

#!/bin/sh
if [ -z "$PLUGIN_USERNAME" ]; then
echo "ERROR: no username provided"
exit 1
fi
if [ -z "$PLUGIN_PASSWORD" ]; then
echo "ERROR: no password provided"
exit 1
fi
export TWINE_USERNAME="$PLUGIN_USERNAME"
export TWINE_PASSWORD="$PLUGIN_PASSWORD"
export TWINE_REPOSITORY_URL="$PLUGIN_REPOSITORY_URL"
if [ -n "$PLUGIN_COMMENT" ]; then
twine upload dist/* --non-interactive --comment "$PLUGIN_COMMENT"
else
twine upload dist/* --non-interactive
fi