From 689350f4edc4c22fc4bc2166ad188129e00be1af Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 24 Sep 2020 13:46:17 -0500 Subject: [PATCH] Bitbucket downloads --- README.md | 6 +++--- create_dist.cmd | 32 +------------------------------- create_dist.sh | 34 ++++++++++++---------------------- 3 files changed, 16 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index a39e17d..5af60e6 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Repertory allows you to mount Sia, Skynet and/or ScPrime blockchain storage solu * ScPrime >=1.4.1.2 ## Downloads -* **Repertory UI v1.3.1 Linux 64-bit** [](https://pixeldrain.com/u/vu41muyq) [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_linux_x86_64.AppImage) +* **Repertory UI v1.3.1 Linux 64-bit** [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_linux_x86_64.AppImage) * NOTE: Linux distributions require `fuse` and `libfuse` to be installed. -* **Repertory UI v1.3.1 OS X 64-bit** [](https://pixeldrain.com/u/wWnKgmL3) [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_mac.dmg) -* **Repertory UI v1.3.1 Windows 64-bit** [](https://pixeldrain.com/u/3LWGxsU6) [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_win.exe) +* **Repertory UI v1.3.1 OS X 64-bit** [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_mac.dmg) +* **Repertory UI v1.3.1 Windows 64-bit** [](https://bitbucket.org/blockstorage/repertory-testing/downloads/repertory-ui_1.3.1_win.exe) ## Supported Platforms * OS X 64-bit diff --git a/create_dist.cmd b/create_dist.cmd index 5b71f03..2045e13 100644 --- a/create_dist.cmd +++ b/create_dist.cmd @@ -46,12 +46,6 @@ pushd "%ROOT%" del /q upload_response.json 1>NUL 2>&1 - ("%CURL_BIN%" -F name="%OUT_FILE%" -F anonymous=true -F file="@%OUT_FILE%" https://pixeldrain.com/api/file > upload_response.json) || ( - call :PIXEL_RESPONSE 0 - ) - call :PIXEL_RESPONSE 1 - set PIXEL_LOCATION=https://pixeldrain.com/api/file/!PIXEL_ID! - call :UPLOAD_TO_BITBUCKET "%OUT_FILE%" call :UPLOAD_TO_BITBUCKET "%OUT_FILE%.sha256" call :UPLOAD_TO_BITBUCKET "%OUT_FILE%.sig" @@ -62,7 +56,7 @@ pushd "%ROOT%" ("%JQ_BIN%" ".Versions.win32|=(.+ ["""%APP_VER%"""]|unique)" ..\releases.json>releases_temp.json && move /Y releases_temp.json releases.json 1>NUL 2>&1) || (call :ERROR "Update releases.json Versions failed") ("%JQ_BIN%" ".Locations.win32."""%APP_VER%""".sig="""!APP_SIG!"""" releases.json>releases_temp.json && move /Y releases_temp.json releases.json 1>NUL 2>&1) || (call :ERROR "Update releases.json sig failed") ("%JQ_BIN%" ".Locations.win32."""%APP_VER%""".sha256="""!APP_SHA256!"""" releases.json>releases_temp.json && move /Y releases_temp.json releases.json 1>NUL 2>&1) || (call :ERROR "Update releases.json sha256 failed") - ("%JQ_BIN%" ".Locations.win32."""%APP_VER%""".urls=["""!PIXEL_LOCATION!""","""!BITBUCKET_LOCATION!"""]" releases.json>releases_temp.json && move /Y releases_temp.json releases.json 1>NUL 2>&1) || (call :ERROR "Update releases.json URL failed") + ("%JQ_BIN%" ".Locations.win32."""%APP_VER%""".urls=["""!BITBUCKET_LOCATION!"""]" releases.json>releases_temp.json && move /Y releases_temp.json releases.json 1>NUL 2>&1) || (call :ERROR "Update releases.json URL failed") ) popd ) || ( @@ -75,30 +69,6 @@ goto :END set %~1=!%~1:"=! goto :EOF -:PIXEL_RESPONSE - set PIXEL_RESPONSE= - if %1==1 ( - for /f "delims=" %%i in ('%JQ_BIN% .success upload_response.json') do ( - if "%%i" == "false" ( - for /f "delims=" %%i in ('%JQ_BIN% .message upload_response.json') do ( - set PIXEL_RESPONSE=!PIXEL_RESPONSE!%%i - ) - call :ERROR "Upload to pixeldrain failed: !PIXEL_RESPONSE!" - ) else ( - for /f "delims=" %%i in ('%JQ_BIN% .id upload_response.json') do ( - set PIXEL_ID=%%i - call :NO_QUOTES PIXEL_ID - ) - ) - ) - ) else ( - for /f "delims=" %%i in ('type upload_response.json') do ( - set PIXEL_RESPONSE=!PIXEL_RESPONSE!%%i - ) - call :ERROR "Upload to pixeldrain failed: !PIXEL_RESPONSE!" - ) -goto :EOF - :UPLOAD_TO_BITBUCKET set SOURCE_FILE=%1 call :NO_QUOTES SOURCE_FILE diff --git a/create_dist.sh b/create_dist.sh index 2bf2255..fb3f4f2 100755 --- a/create_dist.sh +++ b/create_dist.sh @@ -60,30 +60,20 @@ if npm run dist; then APP_SHA256=$(cat ${OUT_FILE}.sha256 | awk '{print $1;}') rm -f upload_response.json 1>/dev/null 2>&1 - curl --fail -F name="${OUT_FILE}" -F anonymous=true -F file="@${OUT_FILE}" https://pixeldrain.com/api/file > upload_response.json || exit_script "Upload to Pixeldrain failed" - PIXEL_SUCCESS=$(${JQ_EXEC} .success upload_response.json) - if [ "${PIXEL_SUCCESS}" = "false" ]; then - PIXEL_MESSAGE=$(${JQ_EXEC} .message upload_response.json) - exit_script "${PIXEL_MESSAGE}" - else - PIXEL_ID=$(${JQ_EXEC} .id upload_response.json|sed s/\"//g) - PIXEL_LOCATION=https://pixeldrain.com/api/file/${PIXEL_ID} + upload_to_bitbucket "${OUT_FILE}" + upload_to_bitbucket "${OUT_FILE}.sha256" + upload_to_bitbucket "${OUT_FILE}.sig" + BITBUCKET_LOCATION=https://bitbucket.org/blockstorage/${REPOSITORY}/downloads/${OUT_FILE} - upload_to_bitbucket "${OUT_FILE}" - upload_to_bitbucket "${OUT_FILE}.sha256" - upload_to_bitbucket "${OUT_FILE}.sig" - BITBUCKET_LOCATION=https://bitbucket.org/blockstorage/${REPOSITORY}/downloads/${OUT_FILE} - - cp -f ../releases.json ./releases.json - for DISTRONAME in ${DISTRO_LIST}; do - ${JQ_EXEC} ".Versions[\"${DISTRONAME}\"]|=(.+ [\"${APP_VER}\"]|unique)" releases.json > releases_temp.json || exit_script "Update releases.json Versions failed" - ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".sig=\"${APP_SIG}\"" releases_temp.json > releases.json || exit_script "Update releases.json sig failed" - ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".sha256=\"${APP_SHA256}\"" releases.json > releases_temp.json || exit_script "Update releases.json sha256 failed" - ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".urls=[\"${PIXEL_LOCATION}\",\"${BITBUCKET_LOCATION}\"]" releases_temp.json > releases.json || exit_script "Update releases.json URL failed" - done - rm -f releases_temp.json - fi + cp -f ../releases.json ./releases.json + for DISTRONAME in ${DISTRO_LIST}; do + ${JQ_EXEC} ".Versions[\"${DISTRONAME}\"]|=(.+ [\"${APP_VER}\"]|unique)" releases.json > releases_temp.json || exit_script "Update releases.json Versions failed" + ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".sig=\"${APP_SIG}\"" releases_temp.json > releases.json || exit_script "Update releases.json sig failed" + ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".sha256=\"${APP_SHA256}\"" releases.json > releases_temp.json || exit_script "Update releases.json sha256 failed" + ${JQ_EXEC} ".Locations[\"${DISTRONAME}\"].\"${APP_VER}\".urls=[\"${BITBUCKET_LOCATION}\"]" releases_temp.json > releases.json || exit_script "Update releases.json URL failed" + done + rm -f releases_temp.json fi cd - else