Support testing
This commit is contained in:
@@ -7,6 +7,13 @@ export PATH
|
||||
|
||||
ENABLE_UPLOAD=$1
|
||||
BITBUCKET_AUTH=$2
|
||||
BITBUCKET_TESTING=$3
|
||||
|
||||
if [ "$BITBUCKET_TESTING" = "1" ]; then
|
||||
REPOSITORY=repertory-testing
|
||||
else
|
||||
REPOSITORY=repertory-ui
|
||||
fi
|
||||
|
||||
PRIVATE_KEY=../../blockstorage_dev_private.pem
|
||||
PUBLIC_KEY=../blockstorage_dev_public.pem
|
||||
@@ -33,7 +40,8 @@ exit_script() {
|
||||
|
||||
upload_to_bitbucket() {
|
||||
SOURCE_FILE=$1
|
||||
curl --fail -u "${BITBUCKET_AUTH}" -X POST https://api.bitbucket.org/2.0/repositories/blockstorage/repertory-ui/downloads -F files=@${SOURCE_FILE} > upload_response.json || exit_script "Upload to Bitbucket failed: ${SOURCE_FILE}"
|
||||
echo "Uploading ${SOURCE_FILE} to Bitbucket ${REPOSITORY}"
|
||||
curl --fail -u "${BITBUCKET_AUTH}" -X POST https://api.bitbucket.org/2.0/repositories/blockstorage/${REPOSITORY}/downloads -F files=@${SOURCE_FILE} > upload_response.json || exit_script "Upload to Bitbucket failed: ${SOURCE_FILE}"
|
||||
}
|
||||
|
||||
chmod +x "bin/${JQ_EXEC}" || exit_script "chmod +x ${JQ_EXEC} failed"
|
||||
@@ -65,7 +73,7 @@ if npm run dist; then
|
||||
upload_to_bitbucket "${OUT_FILE}"
|
||||
upload_to_bitbucket "${OUT_FILE}.sha256"
|
||||
upload_to_bitbucket "${OUT_FILE}.sig"
|
||||
BITBUCKET_LOCATION=https://bitbucket.org/blockstorage/repertory-ui/downloads/${OUT_FILE}
|
||||
BITBUCKET_LOCATION=https://bitbucket.org/blockstorage/${REPOSITORY}/downloads/${OUT_FILE}
|
||||
|
||||
cp -f ../releases.json ./releases.json
|
||||
for DISTRONAME in ${DISTRO_LIST}; do
|
||||
|
||||
Reference in New Issue
Block a user