Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 24, 2021
1 parent da935b6 commit 16b4efc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ jobs:
TWINE_USERNAME=$TWINE_USERNAME \
GPG_EXECUTABLE=$GPG_EXECUTABLE \
DO_UPLOAD=True \
DO_BUILD=False \
DO_TAG=False ./publish.sh
test_deploy:
Expand Down Expand Up @@ -340,6 +341,7 @@ jobs:
TWINE_PASSWORD=${TEST_TWINE_PASSWORD} \
GPG_EXECUTABLE=$GPG_EXECUTABLE \
DO_UPLOAD=True \
DO_BUILD=False \
DO_TAG=False ./publish.sh
Expand Down
29 changes: 9 additions & 20 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ Usage:
TWINE_REPOSITORY_URL="https://test.pypi.org/legacy/"
source $(secret_loader.sh)
MB_PYTHON_TAG=cp38-cp38m
MB_PYTHON_TAG=cp37-cp37m
MB_PYTHON_TAG=cp36-cp36m
MB_PYTHON_TAG=cp35-cp35m
MB_PYTHON_TAG=cp27-cp27mu
echo "MB_PYTHON_TAG = $MB_PYTHON_TAG"
MB_PYTHON_TAG=$MB_PYTHON_TAG ./run_multibuild.sh
DEPLOY_REMOTE=ibeis MB_PYTHON_TAG=$MB_PYTHON_TAG ./publish.sh yes
MB_PYTHON_TAG=py3-none-any ./publish.sh
'''

check_variable(){
Expand Down Expand Up @@ -83,7 +71,6 @@ normalize_boolean(){
DEPLOY_REMOTE=${DEPLOY_REMOTE:=origin}
NAME=${NAME:=$(python -c "import setup; print(setup.NAME)")}
VERSION=$(python -c "import setup; print(setup.VERSION)")
MB_PYTHON_TAG=${MB_PYTHON_TAG:=py3-none-any}

# The default should change depending on the application
#DEFAULT_MODE_LIST=("sdist" "universal" "bdist")
Expand Down Expand Up @@ -132,7 +119,6 @@ VERSION='$VERSION'
TWINE_USERNAME='$TWINE_USERNAME'
TWINE_REPOSITORY_URL = $TWINE_REPOSITORY_URL
GPG_KEYID = '$GPG_KEYID'
MB_PYTHON_TAG = '$MB_PYTHON_TAG'
DO_UPLOAD=${DO_UPLOAD}
DO_TAG=${DO_TAG}
Expand Down Expand Up @@ -173,7 +159,7 @@ fi
if [[ "$DO_BUILD" == "True" ]]; then
echo "About to build wheels"
else
if [[ "$DO_UPLOAD" == "False" ]]; then
if [[ "$DO_BUILD" == "False" ]]; then
echo "We are NOT about to build wheels"
else
read -p "Do you need to build wheels? (input 'yes' to confirm)" ANS
Expand Down Expand Up @@ -208,7 +194,6 @@ if [[ "$WAS_INTERACTION" == "True" ]]; then
TWINE_USERNAME='$TWINE_USERNAME'
TWINE_REPOSITORY_URL = $TWINE_REPOSITORY_URL
GPG_KEYID = '$GPG_KEYID'
MB_PYTHON_TAG = '$MB_PYTHON_TAG'
DO_UPLOAD=${DO_UPLOAD}
DO_TAG=${DO_TAG}
Expand Down Expand Up @@ -260,7 +245,7 @@ if [ "$DO_BUILD" == "True" ]; then
#WHEEL_PATHS+=($WHEEL_PATH)
elif [[ "$_MODE" == "bdist" ]]; then
echo "Assume wheel has already been built"
WHEEL_PATH=$(ls wheelhouse/$NAME-$VERSION-$MB_PYTHON_TAG*.whl)
WHEEL_PATH=$(ls wheelhouse/$NAME-$VERSION-*.whl)
#WHEEL_PATHS+=($WHEEL_PATH)
else
echo "bad mode"
Expand Down Expand Up @@ -293,7 +278,7 @@ do
WHEEL_PATH=$(ls dist/$NAME-$VERSION-$UNIVERSAL_TAG*.whl)
WHEEL_PATHS+=($WHEEL_PATH)
elif [[ "$_MODE" == "bdist" ]]; then
WHEEL_PATH=$(ls wheelhouse/$NAME-$VERSION-$MB_PYTHON_TAG*.whl)
WHEEL_PATH=$(ls wheelhouse/$NAME-$VERSION-*.whl)
WHEEL_PATHS+=($WHEEL_PATH)
else
echo "bad mode"
Expand Down Expand Up @@ -349,10 +334,14 @@ fi


if [[ "$DO_TAG" == "True" ]]; then
git tag $VERSION -m "tarball tag $VERSION"
TAG_NAME="v${VERSION}"
# if we messed up we can delete the tag
# git push origin :refs/tags/$TAG_NAME
# and then tag with -f
#
git tag $TAG_NAME -m "tarball tag $VERSION"
git push --tags $DEPLOY_REMOTE
echo "Should also do a: git push $DEPLOY_REMOTE main:release"
echo "For github should draft a new release: https://github.com/Erotemic/xdoctest/releases/new"
else
echo "Not tagging"
fi
Expand Down

0 comments on commit 16b4efc

Please sign in to comment.