Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# from the other because of the line ending (\r vs \r\n)
* text=auto
*.sh text eol=lf
*.env* text eol=lf
14 changes: 7 additions & 7 deletions download_translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ display_error() {
exit 1
}

if [[ -z "${PUBLIC_TOLGEE_API_URL}" ]]; then
if [ -z "${PUBLIC_TOLGEE_API_URL}" ]; then
display_error "PUBLIC_TOLGEE_API_URL"
else
echo "Using PUBLIC_TOLGEE_API_URL of $PUBLIC_TOLGEE_API_URL"
echo "Using PUBLIC_TOLGEE_API_URL of ${PUBLIC_TOLGEE_API_URL}"
fi

if [[ -z "${PUBLIC_TOLGEE_API_KEY}" ]]; then
if [ -z "${PUBLIC_TOLGEE_API_KEY}" ]; then
display_error "PUBLIC_TOLGEE_API_KEY"
else
echo "Using PUBLIC_TOLGEE_API_KEY of $PUBLIC_TOLGEE_API_KEY"
echo "Using PUBLIC_TOLGEE_API_KEY of ${PUBLIC_TOLGEE_API_KEY}"
fi

curl "$PUBLIC_TOLGEE_API_URL/v2/projects/export" -H "X-API-Key: $PUBLIC_TOLGEE_API_KEY" --output translations.zip
CURL_URL="${PUBLIC_TOLGEE_API_URL}/v2/projects/export"

if ! curl "$PUBLIC_TOLGEE_API_URL/v2/projects/export" -H "X-API-Key: $PUBLIC_TOLGEE_API_KEY" --output translations.zip; then
if ! curl $CURL_URL -H "X-API-Key: ${PUBLIC_TOLGEE_API_KEY}" --output translations.zip; then
echo "Failed to download translation zip file? Tried using URL:"
echo "$PUBLIC_TOLGEE_API_URL/v2/projects/export"
echo $CURL_URL
exit 1
fi

Expand Down
Loading