forked from tus/tus-android-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-bintray.sh
executable file
·32 lines (25 loc) · 992 Bytes
/
deploy-bintray.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
base_url="https://acconut:[email protected]/"
version="$TRAVIS_TAG"
# Generate files
./gradlew build createPom javadocJar sourcesJar -PpomVersion=$version
# Create new version
curl \
-X POST \
$base_url/packages/tus/maven/tus-android-client/versions \
-H "Content-Type: application/json" \
-d "{\"name\":\"${version}\",\"vcs_tag\":\"${version}\"}"
function upload {
local src=$1
local dst=$2
curl \
-X PUT \
"$base_url/content/tus/maven/tus-android-client/$version/io/tus/android/client/tus-android-client/$version/$dst?publish=1" \
-T ./tus-android-client/build/$src
}
# Upload files
upload "libs/tus-android-client-javadoc.jar" "tus-android-client-$version-javadoc.jar"
upload "libs/tus-android-client-sources.jar" "tus-android-client-$version-sources.jar"
upload "outputs/aar/tus-android-client-release.aar" "tus-android-client-$version.aar"
upload "libs/pom.xml" "tus-android-client-$version.pom"