Skip to content

Commit

Permalink
fixes #287
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Feb 15, 2020
1 parent c554c35 commit 93e51ab
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
STARTED=`date`
PACKAGE=`python setup.py --name`
RELEASE=`python setup.py --version`
echo "(`date`) PACKAGE: ${PACKAGE}"
echo "(`date`) RELEASE: ${RELEASE}"
echo "# (`date`) PACKAGE: ${PACKAGE}"
echo "# (`date`) RELEASE: ${RELEASE}"

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

echo "# - - - - - - - - - - - - - - - - - - - - - - - build for PyPI"
echo "# (`date`) - - - - - - - - - - - - - - - - - - - - - - build for PyPI"

## PyPI Build and upload::

echo "(`date`) Building for upload to PyPI"
echo "# (`date`) Building for upload to PyPI"
python setup.py sdist bdist_wheel
echo "(`date`) Built for PyPI"
echo "# (`date`) Built for PyPI"

echo "# - - - - - - - - - - - - - - - - - - - - - - - upload to PyPI"
echo "# (`date`) - - - - - - - - - - - - - - - - - - - - - - upload to PyPI"

twine upload dist/${PACKAGE}-${RELEASE}*
echo "(`date`) Uploaded to PyPI"
echo "# (`date`) Uploaded to PyPI"

echo "# - - - - - - - - - - - - - - - - - - - - - - - conda build"
echo "# (`date`) - - - - - - - - - - - - - - - - - - - - - - conda build"

## Conda Build and upload::

Expand All @@ -41,30 +41,30 @@ else
# production releases
CHANNEL=aps-anl-tag
fi
echo "(`date`) CHANNEL: ${CHANNEL}"
echo "# (`date`) CHANNEL: ${CHANNEL}"

### publish (from linux)

echo "(`date`) Building for upload to conda"
echo "# (`date`) Building for upload to conda"

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

conda build ./conda-recipe/
echo "(`date`) Built for conda"
echo "# (`date`) Built for conda"

echo "# - - - - - - - - - - - - - - - - - - - - - - - upload conda"
echo "# (`date`) - - - - - - - - - - - - - - - - - - - - - - upload conda"

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

# also post to my personal channel
anaconda upload ${BUNDLE}
echo "(`date`) Uploaded to anaconda"
echo "# (`date`) Uploaded to anaconda"

echo "(${STARTED}) started publishing script"
echo "(`date`) finished publishing script"
echo "# (${STARTED}) started publishing script"
echo "# (`date`) finished publishing script"

0 comments on commit 93e51ab

Please sign in to comment.