Skip to content

Commit 61f4dde

Browse files
committed
Fix BINTRAY_APIKEY variable name
1 parent 9bca5b3 commit 61f4dde

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

net.sourceforge.pmd.eclipse.p2updatesite/cleanup-bintray-snapshots.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@ set -e
44
#Sample Usage: cleanup-bintray-snapshots.sh user apikey
55
API=https://api.bintray.com
66

7-
if [ -z $BINTRAY_API_KEY -o -z $BINTRAY_USER ]; then
7+
if [ -z $BINTRAY_APIKEY -o -z $BINTRAY_USER ]; then
88
# only take arguments, if there are now env variable set already
9-
BINTRAY_API_KEY=$1
9+
BINTRAY_APIKEY=$1
1010
BINTRAY_USER=$2
1111
fi
1212

13-
if [ -z $BINTRAY_API_KEY -o -z $BINTRAY_USER ]; then
14-
echo "Usage: $0 <BINTRAY_API_KEY> <BINTRAY_USER>"
13+
if [ -z $BINTRAY_APIKEY -o -z $BINTRAY_USER ]; then
14+
echo "Usage: $0 <BINTRAY_APIKEY> <BINTRAY_USER>"
1515
exit 1
1616
fi
1717

18+
echo
19+
echo Cleanup up old snapshot builds
20+
echo ------------------------------
21+
echo
22+
23+
1824
BINTRAY_REPO=pmd-eclipse-plugin
1925
BINTRAY_OWNER=pmd
2026

@@ -62,7 +68,7 @@ for v in $artifacts_versions; do
6268
echo "Deleting $v ..."
6369

6470
for file in artifacts.jar artifacts.xml.xz content.jar content.xml.xz p2.index features/net.sourceforge.pmd.eclipse_${v}.jar plugins/net.sourceforge.pmd.eclipse.plugin_${v}.jar; do
65-
${DRY_RUN} curl -X DELETE -u${BINTRAY_USER}:${BINTRAY_API_KEY} "https://api.bintray.com/content/${BASE_PATH_SNAPSHOT_BUILDS}/${v}/${file}"
71+
${DRY_RUN} curl -X DELETE -u${BINTRAY_USER}:${BINTRAY_APIKEY} "https://api.bintray.com/content/${BASE_PATH_SNAPSHOT_BUILDS}/${v}/${file}"
6672
done
6773
echo
6874
echo ----------------------------------------
@@ -86,7 +92,7 @@ $artifacts
8692
</repository>
8793
"
8894
echo "${artifactsTemplate}" > ${ARTIFACTS_FILE}.new
89-
${DRY_RUN} curl -X PUT -u${BINTRAY_USER}:${BINTRAY_API_KEY} -T ${ARTIFACTS_FILE}.new https://api.bintray.com/content/${BASE_PATH}/${ARTIFACTS_FILE};publish=1
95+
${DRY_RUN} curl -X PUT -u${BINTRAY_USER}:${BINTRAY_APIKEY} -T ${ARTIFACTS_FILE}.new https://api.bintray.com/content/${BASE_PATH}/${ARTIFACTS_FILE};publish=1
9096

9197

9298
content=$(grep "<child location" ${CONTENT_FILE} | tail -${KEEP})
@@ -111,7 +117,7 @@ $content
111117
</repository>
112118
"
113119
echo "${contentTemplate}" > ${CONTENT_FILE}.new
114-
${DRY_RUN} curl -X PUT -u${BINTRAY_USER}:${BINTRAY_API_KEY} -T ${CONTENT_FILE}.new https://api.bintray.com/content/${BASE_PATH}/${CONTENT_FILE};publish=1
120+
${DRY_RUN} curl -X PUT -u${BINTRAY_USER}:${BINTRAY_APIKEY} -T ${CONTENT_FILE}.new https://api.bintray.com/content/${BASE_PATH}/${CONTENT_FILE};publish=1
115121

116122

117123
popd

0 commit comments

Comments
 (0)