Programmatic Access to PKG_HASH

0 views
Skip to first unread message

Jay L

unread,
Nov 9, 2017, 8:03:01 AM11/9/17
to conda - Public
I am building a conda package in TravisCI and then trying to automate the upload to Anaconda Cloud.  In an after success block on Travis `conda build .` is executed, followed by: anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-h$PKG_HASH_0.tar.bz2 --force. Post build, it does not look like $PKG_HASH is still defined and I wonder how best to programmatically capture the hash for use in uploading.

Thanks!

Michael Sarahan

unread,
Nov 9, 2017, 8:47:15 AM11/9/17
to Jay L, conda - Public
You should just have conda build do the upload for you. If you pass your --token argument to your build command, it should just work. The --user argument is superfluous unless it's different from the channel for the token that you created.

If you don't have conda build do the upload for you, you can get the output filenames with something like

$(conda build --output your-recipe )

The --output flag tells conda build to output the anticipated build filename(s) without actually building anything.

On Nov 9, 2017 7:03 AM, "Jay L" <drfe...@gmail.com> wrote:
I am building a conda package in TravisCI and then trying to automate the upload to Anaconda Cloud.  In an after success block on Travis `conda build .` is executed, followed by: anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-h$PKG_HASH_0.tar.bz2 --force. Post build, it does not look like $PKG_HASH is still defined and I wonder how best to programmatically capture the hash for use in uploading.

Thanks!

--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/f754babc-722c-4423-a561-033d322a2a74%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Jay L

unread,
Nov 9, 2017, 11:24:47 AM11/9/17
to conda - Public, drfe...@gmail.com
Works great.  Thanks!
Reply all
Reply to author
Forward
0 new messages