devops: fix upload to work in mingw
This commit is contained in:
Родитель
3190044c00
Коммит
d2ba399946
|
@ -30,7 +30,12 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
ZIP_PATH="/tmp/archive-$BROWSER_NAME.zip"
|
||||
if [[ $(uname) == MINGW* ]]; then
|
||||
ZIP_PATH="$PWD/archive-$BROWSER_NAME.zip"
|
||||
else
|
||||
ZIP_PATH="/tmp/archive-$BROWSER_NAME.zip"
|
||||
fi
|
||||
|
||||
if [[ -f $ZIP_PATH ]]; then
|
||||
echo "Archive $ZIP_PATH already exists - remove and re-run the script."
|
||||
exit 1
|
||||
|
|
|
@ -89,8 +89,14 @@ if ! [[ $ZIP_PATH == *.zip ]]; then
|
|||
echo "ERROR: $ZIP_PATH is not a zip archive (must have a .zip extension)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
az storage blob upload -c builds --account-key $AZ_ACCOUNT_KEY --account-name $AZ_ACCOUNT_NAME -f $ZIP_PATH -n "$BLOB_PATH"
|
||||
if [[ $(uname) == MINGW* ]]; then
|
||||
WIN_PATH=$({ cd $(dirname $ZIP_PATH) && pwd -W; } | sed 's|/|\\|g')
|
||||
WIN_PATH="${WIN_PATH}\\$(basename $ZIP_PATH)"
|
||||
echo $WIN_PATH
|
||||
az storage blob upload -c builds --account-key $AZ_ACCOUNT_KEY --account-name $AZ_ACCOUNT_NAME -f $WIN_PATH -n $BLOB_PATH
|
||||
else
|
||||
az storage blob upload -c builds --account-key $AZ_ACCOUNT_KEY --account-name $AZ_ACCOUNT_NAME -f $ZIP_PATH -n "$BLOB_PATH"
|
||||
fi
|
||||
|
||||
echo "UPLOAD SUCCESSFUL!"
|
||||
echo "-- SRC: $ZIP_PATH"
|
||||
|
|
Загрузка…
Ссылка в новой задаче