diff --git a/install.sh b/install.sh index 295c5912..9c6628ca 100644 --- a/install.sh +++ b/install.sh @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -version="1.0.0-beta.1" +version="1.0.0-beta.2" repo='https://github.com/tidbcloud/tidbcloud-cli/releases/download' if [ -n "$TICLOUD_MIRRORS" ]; then diff --git a/internal/cli/serverless/branch/create.go b/internal/cli/serverless/branch/create.go index a584e4dc..9ce61332 100644 --- a/internal/cli/serverless/branch/create.go +++ b/internal/cli/serverless/branch/create.go @@ -253,7 +253,7 @@ func CreateAndSpinnerWait(ctx context.Context, h *internal.Helper, d cloud.TiDBC for { select { case <-timer: - return ui.Result(fmt.Sprintf("Timeout waiting for branch %s to be ready, please check status on dashboard.", newBranchID)) + return errors.New(fmt.Sprintf("Timeout waiting for branch %s to be ready, please check status on dashboard.", newBranchID)) case <-ticker.C: b, err := d.GetBranch(ctx, clusterId, newBranchID) if err != nil { diff --git a/internal/cli/upgrade/upgrade.go b/internal/cli/upgrade/upgrade.go index 293f84f4..3caf29de 100644 --- a/internal/cli/upgrade/upgrade.go +++ b/internal/cli/upgrade/upgrade.go @@ -42,16 +42,16 @@ func Cmd(h *internal.Helper) *cobra.Command { Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() - // If is managed by TiUP, we should disable the update command since binpath is different. + // If is managed by TiUP, we should disable the upgrade command since binpath is different. if config.IsUnderTiUP { - return errors.New("the CLI is managed by TiUP, please update it by `tiup update cloud`") + return errors.New("the CLI is managed by TiUP, please upgrade it by `tiup update cloud`") } - // When update CLI, we don't need to check the version again after command executes. + // When upgrade CLI, we don't need to check the version again after command executes. newRelease, err := github.CheckForUpdate(ctx, false) - // If we can't get the latest version, we should update the CLI assuming it's not the latest version. + // If we can't get the latest version, we should upgrade the CLI assuming it's not the latest version. if err != nil { - log.Debug("Failed to check for update, update the CLI assuming it's not the latest version", zap.Error(err)) + log.Debug("Failed to check for upgrade, upgrade the CLI assuming it's not the latest version", zap.Error(err)) newRelease = &github.ReleaseInfo{ Version: "latest", } @@ -74,7 +74,7 @@ func Cmd(h *internal.Helper) *cobra.Command { } func updateAndWaitReady(ctx context.Context, h *internal.Helper, newRelease *github.ReleaseInfo) error { - fmt.Fprintf(h.IOStreams.Out, "... Updating the CLI to version %s\n", newRelease.Version) + fmt.Fprintf(h.IOStreams.Out, "... Upgrading the CLI to version %s\n", newRelease.Version) ctx, cancel := context.WithTimeout(ctx, 1*time.Minute) defer cancel() @@ -160,7 +160,7 @@ func updateAndSpinnerWait(ctx context.Context, h *internal.Helper, newRelease *g if err != nil { return err } else { - return ui.Result("Update successfully!") + return ui.Result("Upgrade successfully!") } case <-ctx.Done(): return util.InterruptError @@ -170,7 +170,7 @@ func updateAndSpinnerWait(ctx context.Context, h *internal.Helper, newRelease *g } } - p := tea.NewProgram(ui.InitialSpinnerModel(task, fmt.Sprintf("Updating the CLI to version %s", newRelease.Version))) + p := tea.NewProgram(ui.InitialSpinnerModel(task, fmt.Sprintf("Upgrading the CLI to version %s", newRelease.Version))) model, err := p.Run() if err != nil { return errors.Trace(err) diff --git a/latest-version b/latest-version index ada98c6f..40d474ce 100644 --- a/latest-version +++ b/latest-version @@ -1 +1 @@ -v1.0.0-beta.1 \ No newline at end of file +v1.0.0-beta.2 \ No newline at end of file