From e347032987023e7e24494ae3ab9756c4b4455d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=BCrzeder?= Date: Wed, 9 Aug 2023 14:53:25 +0200 Subject: [PATCH] Added deprecation/moved notice (#6) --- README.md | 2 ++ cmd/root.go | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 61b5ea9..570a795 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ ![GitHub stars](https://img.shields.io/github/stars/stiviik/azctx.svg?label=github%20stars) ![GitHub contributors](https://img.shields.io/github/contributors/stiviik/azctx.svg?label=github%20contributors) +## NOTE: This repository has been moved, please use the new repository: [whiteducksoftware/azctx](https://github.com/whiteducksoftware/azctx). + **`azctx`** helps you switch between azure cli subscriptions back and forth: ![azctx demo GIF](assets/img/azctx-demo.png) diff --git a/cmd/root.go b/cmd/root.go index a7e5192..7ea6330 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -3,12 +3,14 @@ package cmd import ( "errors" "os" + "time" "github.com/StiviiK/azctx/azurecli" "github.com/StiviiK/azctx/log" "github.com/StiviiK/azctx/prompt" "github.com/StiviiK/azctx/updates" "github.com/StiviiK/azctx/utils" + "github.com/fatih/color" "github.com/spf13/afero" "github.com/spf13/cobra" "go.szostok.io/version/extension" @@ -55,6 +57,12 @@ func Execute() { } func rootRunE(cmd *cobra.Command, args []string) error { + // Deprecation notice, repository moved to whiteducksoftware/azctx + textColor := color.New(color.FgRed).Add(color.Bold).SprintFunc() + log.Error(textColor("!!! The azctx repository has moved to https://github.com/whiteducksoftware/azctx. Please update your installation. !!!")) + log.Error(textColor("See https://github.com/whiteducksoftware/azctx/blob/main/README.md#migrate-from-stiviikazctx for more information.")) + time.Sleep(500 * time.Millisecond) + // Initialize the CLI cli, err := azurecli.New(afero.NewOsFs()) if err != nil {