I'm automating the deploy process of a project and one of the things that I'm struggling is to download from Bintray the latest snapshot version of a given maven artifact. This https://bintray.com/docs/api/#_dynamic_download documentation states that you should use $latest variable but all tentatives gave me a 404 error. Following is a curl sample
curl -v -H 'X-Bintray-Package: main' -utmoreira2020:mytoken 'https://bintray.com/content/liferay/myrepo/com/liferay/myproject/distribution/$latest/distribution-$latest.lpkg'
Thanks in advance
Couple of things that can go wrong here:
$
as a special character, you need to escape it with \
. Here's an example: curl -u jbaruch -L "https://api.bintray.com/content/jfrog-int/iot-generic-distribution/firmare-\$latest.bin?bt_package=arduino-jfrog-firmware"
[SNAPSHOT]
token, but that won't happen, because Bintray is a service for distributing releases, not development time snapshots (use Artifactory).