Commit ebc1e350 authored by Drahomír Karchňák's avatar Drahomír Karchňák

Added separated server secret for debug and production.

parent 1c8d5ff3
......@@ -69,6 +69,8 @@ allprojects {
assetsUploadURL = (project.hasProperty("TABLEXIA_ASSETS_UPLOAD_USER") && project.hasProperty("TABLEXIA_ASSETS_UPLOAD_URL")) ? "${TABLEXIA_ASSETS_UPLOAD_USER}@${TABLEXIA_ASSETS_UPLOAD_URL}/${assetsDebugURLPart}" : "<NO_URL_CONFIGURED>/"
serverFallbackHost = "<NO_SERVER_HOST>"
serverHost = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_PRODUCTION", serverFallbackHost) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_HOST_DEBUG", serverFallbackHost)
serverSecretFallback = "";
serverSecret = onMaster() ? getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_PRODUCTION", serverSecretFallback) : getPropertyValueOrFallbackValue("TABLEXIA_SERVER_SECRET_DEBUG", serverSecretFallback);
tablexiaVersionName = getVersionNameFromGit(TABLEXIA_GIT_PATH)
tablexiaVersionCode = getVersionCodeFromGit(TABLEXIA_GIT_PATH)
tablexiaModelVersionName = getVersionNameFromGit(MODEL_GIT_PATH)
......
......@@ -63,7 +63,7 @@ task writeTablexiaBuildConfig {
" public final static String TABLEXIA_SERVER_PROTOCOL = ${project.hasProperty('TABLEXIA_SERVER_PROTOCOL') ? "\"$TABLEXIA_SERVER_PROTOCOL\"" : "null"};\n" +
" public final static String TABLEXIA_SERVER_HOST = \"${project.serverHost}\";\n" +
" public final static Integer TABLEXIA_SERVER_PORT = ${project.hasProperty('TABLEXIA_SERVER_PORT') ? "$TABLEXIA_SERVER_PORT" : "null"};\n" +
" public final static String TABLEXIA_SERVER_SECRET = ${project.hasProperty('TABLEXIA_SERVER_SECRET') ? "\"$TABLEXIA_SERVER_SECRET\"" : "null"};\n" +
" public final static String TABLEXIA_SERVER_SECRET = \"${project.serverSecret}\";\n" +
" public final static String SENTRY_DSN_FALLBACK = \"${project.sentryDSNFallbackValue}\";\n" +
"\n" +
"}", BUILD_CONFIG_FILE_ENCODING)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment