Skip to content

Commit

Permalink
PKG revise
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Jemian committed Jul 9, 2019
1 parent f7fe164 commit f91fab6
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

PACKAGE=spec2nexus
RELEASE=`python setup.py --version`

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

python setup.py sdist bdist_wheel
Expand All @@ -16,18 +19,26 @@ twine upload dist/${PACKAGE}-${RELEASE}*

### Conda channels

# `prjemian` personal channel
# `aps-anl-tag` production releases
# `aps-anl-dev` anything else, such as: pre-release, release candidates, or testing purposes
CHANNEL=prjemian
# if [[ ${RELEASE} == \'*\' ]]
if [[ ${RELEASE} == *rc* ]] ; then
# anything else, such as: pre-release, release candidates, or testing purposes
CHANNEL=aps-anl-dev
else
# production releases
CHANNEL=aps-anl-tag
fi

### publish
### publish (from linux)

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

conda build ./conda-recipe/
BUILD_DIR=${CONDA_BLD_PATH}/noarch
BUNDLE=${BUILD_DIR}/${PACKAGE}-${RELEASE}-py*_0.tar.bz2
anaconda upload -u ${CHANNEL} ${BUNDLE}

# also post to my personal channel
CHANNEL=prjemian
anaconda upload -u ${CHANNEL} ${BUNDLE}

0 comments on commit f91fab6

Please sign in to comment.