Skip to content

Commit

Permalink
PKG generalize
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jul 10, 2019
1 parent 5a1ac88 commit c25dd0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@

PACKAGE=`python setup.py --name`
RELEASE=`python setup.py --version`
echo "PACKAGE: ${PACKAGE}"
echo "RELEASE: ${RELEASE}"

if [[ ${RELEASE} == *dirty || ${RELEASE} == *+* ]] ; then
echo "version: ${RELEASE} not ready to publish"
exit 1
fi

## PyPI Build and upload::

echo "Building for upload to PyPI"
python setup.py sdist bdist_wheel
twine upload dist/${PACKAGE}-${RELEASE}*

Expand All @@ -31,13 +35,17 @@ fi

### publish (from linux)

echo "Building for upload to conda"

export CONDA_BLD_PATH=/tmp/conda-bld
/bin/mkdir -p ${CONDA_BLD_PATH}

conda build ./conda-recipe/
BUILD_DIR=${CONDA_BLD_PATH}/noarch
_package_=$(echo ${PACKAGE} | tr '[:upper:]' '[:lower:]')
BUNDLE=${BUILD_DIR}/${_package_}-${RELEASE}-*_0.tar.bz2
echo "upload to conda"
echo "CHANNEL: ${CHANNEL}"
anaconda upload -u ${CHANNEL} ${BUNDLE}

# also post to my personal channel
Expand Down

0 comments on commit c25dd0e

Please sign in to comment.