Skip to content

Commit

Permalink
Merge pull request #5312 from opengisch/backport-5308-to-release-3_3
Browse files Browse the repository at this point in the history
[Backport release-3_3] 2024, we're still running into this...
  • Loading branch information
m-kuhn authored Jun 6, 2024
2 parents f5770c4 + 65a50bd commit 6b9cdaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

2 comments on commit 6b9cdaa

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.