Created
October 2, 2017 14:08
-
-
Save bjhargrave/4cb2fed7a3aa6460e5762dbd38fee050 to your computer and use it in GitHub Desktop.
Bash script to upload Bnd build to bintray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# find -E biz -regex '.*\.(pom|jar)$' -exec bintrayup.sh "{}" ";" | |
BINTRAY_USER=xxx | |
BINTRAY_API_KEY=yyy | |
SLUG=bnd/bnd | |
file=$1 | |
packageprefix=${file%/*/*} | |
versionprefix=${file%/*} | |
package=${packageprefix##*/} | |
version=${versionprefix##*/} | |
echo curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -X POST -H Content-Type:\ application/json -d \{\"name\":\"${version}\"\,\"desc\":\"\"\,\"vcs_tag\":\"${version}.REL\"\} https://api.bintray.com/packages/${SLUG}/${package}/versions | |
curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -X POST -H Content-Type:\ application/json -d \{\"name\":\"${version}\"\,\"desc\":\"\"\,\"vcs_tag\":\"${version}.REL\"\} https://api.bintray.com/packages/${SLUG}/${package}/versions | |
echo curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -T ${file} https://api.bintray.com/maven/${SLUG}/${package}/${file} | |
curl -u${BINTRAY_USER}:${BINTRAY_API_KEY} -T ${file} https://api.bintray.com/maven/${SLUG}/${package}/${file} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment