Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_3] 2024, we're still running into this... #5312

Merged
merged 5 commits into from
Jun 6, 2024
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
9 changes: 5 additions & 4 deletions scripts/ci/generate-version-details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ echo "CURRENT_COMMIT: ${CURRENT_COMMIT}"

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"

APP_VERSION_NAME=$(cat ${DIR}/../../RELEASE_NAME)

if [[ -n ${CI_TAG} ]]; then
echo "Building release from tag"
APP_VERSION_NAME=$(cat ${DIR}/../../RELEASE_NAME)
# v1.2.3 Release Name -> 1.2.3 Release Name
# v1.2.3-rc4 Release Name -> 1.2.3 RC4 Release Name
APP_VERSION_STR="$(app_version_str ${CI_TAG}) - ${APP_VERSION_NAME}"
Expand Down Expand Up @@ -47,14 +48,13 @@ elif [[ ${CI_PULL_REQUEST} = false ]]; then
# take 0 + (2020400 + number of CI runs) + arch(triplet) number
# 020204000 has no meaning - it's just where we had to start
# max = 2100000000
export APP_VERSION_STR="${CI_BRANCH}-dev"
export APP_VERSION_STR="${CI_BRANCH}-dev - ${APP_VERSION_NAME}"
if [[ -n ${CUSTOM_APP_PACKAGE_NAME} ]]; then
export APK_VERSION_CODE="${CI_RUN_NUMBER}${TRIPLET_NUMBER}"
else
export APK_VERSION_CODE=0$((2020400 + CI_RUN_NUMBER))${TRIPLET_NUMBER}
fi
export APP_ENV="dev"

else
echo "Building pull request beta"
if [[ ${ALL_FILES_ACCESS} == "ON" ]]; then
Expand All @@ -64,9 +64,10 @@ else
export APP_NAME="QField Beta ${CI_PULL_REQUEST_NUMBER}"
export APP_PACKAGE_NAME="qfield_beta"
fi

export APP_ICON="qfield_logo_pr"
export APP_VERSION=""
export APP_VERSION_STR="PR${CI_PULL_REQUEST_NUMBER}"
export APP_VERSION_STR="PR${CI_PULL_REQUEST_NUMBER} - ${APP_VERSION_NAME}"
export APK_VERSION_CODE="1"
export APP_ENV="pr"
fi
Expand Down
2 changes: 1 addition & 1 deletion src/core/qfieldcloudconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ QFieldCloudConnection::QFieldCloudConnection()
QgsNetworkAccessManager::instance()->setTimeout( 60 * 60 * 1000 );
QgsNetworkAccessManager::instance()->setTransferTimeout( 5 * 60 * 1000 );
// we cannot use "/" as separator, since QGIS puts a suffix QGIS/31700 anyway
const QString userAgent = QStringLiteral( "qfield|%1|%2|%3|" ).arg( qfield::appVersion, qfield::appVersionStr, qfield::gitRev );
const QString userAgent = QStringLiteral( "qfield|%1|%2|%3|" ).arg( qfield::appVersion, qfield::appVersionStr.normalized( QString::NormalizationForm_KD ), qfield::gitRev );
QgsSettings().setValue( QStringLiteral( "/qgis/networkAndProxy/userAgent" ), userAgent );
}

Expand Down
Loading