forked from knowhow/F18_knowhow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
upload_localhost.sh
34 lines (23 loc) · 1.05 KB
/
upload_localhost.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
33
34
#!/bin/bash
# https://github.com/$BINTRAY_OWNER/greenbox/blob/apps_modular/upload_app.sh
if [[ ! `which curl` ]] ; then
sudo apt-get install -y curl
fi
BINTRAY_API_KEY=${BINTRAY_API_KEY:-`cat bintray_api_key`}
BINTRAY_OWNER=bringout
BINTRAY_REPOS=F18
BINTRAY_PACKAGE=F18-linux-$BINTRAY_ARCH
BINTRAY_PACKAGE_VER=${BUILD_BUILDNUMBER}
FILE=${BINTRAY_PACKAGE}_${BINTRAY_PACKAGE_VER}.zip
echo "upload: ${BINTRAY_PACKAGE} / ${FILE}"
zip -r -v $FILE F18
ls -lh $FILE
set
echo uploading $FILE to nextcloud [email protected] ...
#curl -s -T $FILE \
# -u $BINTRAY_OWNER:$BINTRAY_API_KEY \
# --header "X-Bintray-Override: 1" \
# https://api.bintray.com/content/$BINTRAY_OWNER/$BINTRAY_REPOS/$BINTRAY_PACKAGE/$BINTRAY_PACKAGE_VER/$FILE
#curl -s -u $BINTRAY_OWNER:$BINTRAY_API_KEY \
# -X POST https://api.bintray.com/content/$BINTRAY_OWNER/$BINTRAY_REPOS/$BINTRAY_PACKAGE/$BINTRAY_PACKAGE_VER/publish
curl -X PUT -u "[email protected]:${NEXTCLOUD_HERNAD_PWD}" "https://drive.bring.out.ba/remote.php/webdav/Downloads/${FILE}" --data-binary @"${FILE}"