From d12ad4e1262b4730f953dca7ee9cd79dc39aca69 Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Thu, 29 Feb 2024 11:50:40 -0500 Subject: [PATCH] fix(shorebird_cli): update 'SHOREBIRD_TOKEN needs refresh' warning (#1768) --- .../integration_test/shorebird_cli_integration_test.dart | 5 ++--- packages/shorebird_cli/lib/src/auth/auth.dart | 5 ++--- packages/shorebird_cli/test/src/auth/auth_test.dart | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart index f196ca45..d5ea9a1a 100644 --- a/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart +++ b/packages/shorebird_cli/integration_test/shorebird_cli_integration_test.dart @@ -16,9 +16,8 @@ import 'package:test/test.dart'; import 'package:uuid/uuid.dart'; const tokenWarningMessage = ''' -[WARN] The value of SHOREBIRD_TOKEN is not a valid base64-encoded token. This -will become an error in the next major release. Run `shorebird login:ci` before -then to obtain a new token. +[WARN] $shorebirdTokenEnvVar needs to be updated before the next major release. +Run `shorebird login:ci` to obtain a new token. '''; R runWithOverrides(R Function() body) { diff --git a/packages/shorebird_cli/lib/src/auth/auth.dart b/packages/shorebird_cli/lib/src/auth/auth.dart index af11e542..6d8ab9c2 100644 --- a/packages/shorebird_cli/lib/src/auth/auth.dart +++ b/packages/shorebird_cli/lib/src/auth/auth.dart @@ -271,9 +271,8 @@ class Auth { // TODO(bryanoltman): Remove this legacy behavior after July 2024 or // next major release. logger.warn(''' -The value of $shorebirdTokenEnvVar is not a valid base64-encoded token. This -will become an error in the next major release. Run `shorebird login:ci` before -then to obtain a new token.'''); +[WARN] $shorebirdTokenEnvVar needs to be updated before the next major release. +Run `shorebird login:ci` to obtain a new token.'''); _token = CiToken( refreshToken: envToken, authProvider: AuthProvider.google, diff --git a/packages/shorebird_cli/test/src/auth/auth_test.dart b/packages/shorebird_cli/test/src/auth/auth_test.dart index c18f5c35..5bd34295 100644 --- a/packages/shorebird_cli/test/src/auth/auth_test.dart +++ b/packages/shorebird_cli/test/src/auth/auth_test.dart @@ -423,9 +423,8 @@ void main() { auth = buildAuth(); verify( () => logger.warn(''' -The value of $shorebirdTokenEnvVar is not a valid base64-encoded token. This -will become an error in the next major release. Run `shorebird login:ci` before -then to obtain a new token.'''), +[WARN] SHOREBIRD_TOKEN needs to be updated before the next major release. +Run `shorebird login:ci` to obtain a new token.'''), ).called(1); }); });