You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d6d847a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): Tell self-hosted Android projects to set SENTRY_URL in CI
On self-hosted Sentry, sentry.properties also holds the server URL, so
machines without the file need SENTRY_URL along with SENTRY_AUTH_TOKEN.
Say so in the warning and the outro line.
@@ -222,8 +227,8 @@ ${chalk.greenBright("Successfully installed the Sentry Android SDK!")}
222
227
223
228
${chalk.yellow(
224
229
placeholderToken
225
-
? `Replace the placeholder auth token in ${SENTRY_PROPERTIES_FILE} before building Release, and set ${AUTH_TOKEN_ENV_VAR} for Release builds on other machines and in CI.`
226
-
: `Release builds on other machines and in CI need ${AUTH_TOKEN_ENV_VAR}, since ${SENTRY_PROPERTIES_FILE} is gitignored.`,
230
+
? `Replace the placeholder auth token in ${SENTRY_PROPERTIES_FILE} before building Release, and set ${ciEnvVars(propertiesUrl)} for Release builds on other machines and in CI.`
231
+
: `Release builds on other machines and in CI need ${ciEnvVars(propertiesUrl)}, since ${SENTRY_PROPERTIES_FILE} is gitignored.`,
* Warning that Release builds fail at the Sentry upload tasks wherever
241
256
* `sentry.properties` has no real auth token: on every other machine, since
242
257
* the file is gitignored, and on this one too when it holds the placeholder.
258
+
*
259
+
* @param serverUrl - Self-hosted server URL written to the file, if any
243
260
*/
244
261
functionauthTokenWarning(
245
262
placeholderToken: boolean,
246
263
settingsUrl: string,
264
+
serverUrl: string|undefined,
247
265
): string{
248
266
constfile=chalk.cyan(SENTRY_PROPERTIES_FILE);
249
267
constenvVar=chalk.cyan(AUTH_TOKEN_ENV_VAR);
250
268
consturl=chalk.cyan(settingsUrl);
269
+
constsetUrl=serverUrl
270
+
? `${chalk.cyan(URL_ENV_VAR)} to ${chalk.cyan(serverUrl)}`
271
+
: undefined;
251
272
if(placeholderToken){
252
273
return`${file} holds a placeholder auth token (${chalk.cyan(
253
274
`"${DUMMY_AUTH_TOKEN}"`,
254
-
)}), so Release builds on this machine fail at the Sentry upload too. Replace it with a token from:\n${url}\n${file} is also gitignored, so Release builds on other machines fail the same way until they have a token: in CI, set ${envVar}, and teammates can create their own ${file}.`;
275
+
)}), so Release builds on this machine fail at the Sentry upload too. Replace it with a token from:\n${url}\n${file} is also gitignored, so Release builds on other machines fail the same way until they have a token: in CI, set ${envVar}${setUrl ? ` and ${setUrl}` : ""}, and teammates can create their own ${file}.`;
255
276
}
256
-
return`${file} holds your auth tokenand is gitignored, so other machines, such as a teammate's clone or CI, don't have it. Release builds there fail at the Sentry upload until a token is available: in CI, set ${envVar} to a token from:\n${url}\nTeammates can create their own ${file}.`;
277
+
return`${file} holds your auth token${serverUrl ? " and server URL" : ""} and is gitignored, so other machines, such as a teammate's clone or CI, don't have ${serverUrl ? "them" : "it"}. Release builds there fail at the Sentry upload until a token is available: in CI, set ${envVar} to a token from:\n${url}\n${setUrl ? `Also set ${setUrl}.\n` : ""}Teammates can create their own ${file}.`;
0 commit comments