From 4ecbacdb4461a71967f8b3b4d4281d9c71f4dfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Tue, 23 Apr 2024 10:14:10 +0200 Subject: [PATCH 1/3] chore: add deprecation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Würbach --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b81c48c..30edbd4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ # ![Score](docs/images/logo.svg) Score overview +--- + +:warning: __The [`humctl` Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/) now supports Score natively and `score-humanitec` is deprecated. Checkout the docs on [how to deploy with humctl](https://developer.humanitec.com/score/getting-started/hello-world/#deploying-using-humctl).__ :warning: + +--- + Score aims to improve developer productivity and experience by reducing the risk of configuration inconsistencies between local and remote environments. It provides developer-centric workload specification (`score.yaml`) which captures a workloads runtime requirements in a platform-agnostic manner. Learn more [here](https://github.com/score-spec/spec#-what-is-score). The `score.yaml` specification file can be executed against a _Score Implementation CLI_, a conversion tool for application developers to generate environment specific configuration. In combination with environment specific parameters, the CLI tool can run your workload in the target environment by generating a platform-specific configuration file. The `score-humanitec` CLI is used to generate and deploy a [Humanitec deployment delta](https://developer.humanitec.com/score/reference/delta/). @@ -29,8 +35,8 @@ If you're just getting started, follow [this guide](https://docs.score.dev/docs/ - Give the project a star! - Contact us via email: - - team@score.dev - - abuse@score.dev + - + - - See our [documentation](https://docs.score.dev) ## ![Contributing](docs/images/contributing.svg) Contributing From 82aa0165601cef645246c515c56db56157f356b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Wed, 8 May 2024 19:06:31 +0200 Subject: [PATCH 2/3] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Tobias Babin <140624220+TobiasBabin@users.noreply.github.com> Signed-off-by: Johannes Würbach --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30edbd4..8ad2d86 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -:warning: __The [`humctl` Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/) now supports Score natively and `score-humanitec` is deprecated. Checkout the docs on [how to deploy with humctl](https://developer.humanitec.com/score/getting-started/hello-world/#deploying-using-humctl).__ :warning: +:warning: __The [`humctl` Humanitec CLI](https://developer.humanitec.com/platform-orchestrator/cli/) now supports Score natively and `score-humanitec` is deprecated. Checkout the docs on [how to deploy with humctl](https://developer.humanitec.com/platform-orchestrator/reference/cli-references/#score-integration).__ :warning: --- From b0ba47e96d1519bfbd2d18a6c4e2234dc5dba45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Wed, 8 May 2024 20:12:41 +0200 Subject: [PATCH 3/3] chore: add deprecation message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Würbach --- .goreleaser.yaml | 2 ++ internal/command/consts.go | 4 ++++ internal/command/delta.go | 2 +- internal/command/draft.go | 1 + internal/command/root.go | 7 ++++++- internal/command/run.go | 1 + 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b63ba92..dc82488 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -42,3 +42,5 @@ brews: commit_author: name: rachfop email: prachford@icloud.com + custom_block: | + deprecate! date: "2024-05-08", because: "has been replaced by humctl score deploy. For more information visit https://developer.humanitec.com/platform-orchestrator/reference/cli-references/#score-integration." diff --git a/internal/command/consts.go b/internal/command/consts.go index f506c24..33abb03 100644 --- a/internal/command/consts.go +++ b/internal/command/consts.go @@ -14,6 +14,10 @@ const ( apiUrlDefault = "https://api.humanitec.io" uiUrlDefault = "https://app.humanitec.io" messageDefault = "Auto-deployment (SCORE)" + deprecationMessage = `score-humanitec is deprecated, please use the humctl instead. +For more information visit https://developer.humanitec.com/platform-orchestrator/reference/cli-references/#score-integration. + +` ) var ( diff --git a/internal/command/delta.go b/internal/command/delta.go index b0869aa..92f7cff 100644 --- a/internal/command/delta.go +++ b/internal/command/delta.go @@ -56,7 +56,7 @@ func init() { var deltaCmd = &cobra.Command{ Use: "delta", Short: "Creates or updates a Humanitec deployment delta from the source SCORE file", - Long: `This command will translate the SCORE file into a Humanitec deployment delta and submit it to the Humanitec + Long: deprecationMessage + `This command will translate the SCORE file into a Humanitec deployment delta and submit it to the Humanitec environment specified by the --org, --app, and --env flags. If the --delta flag is provided, the generated delta will be merged with the specified existing delta. The --deploy flag allows the deployment of the delta to be triggered. `, diff --git a/internal/command/draft.go b/internal/command/draft.go index b04be2e..ad0773b 100644 --- a/internal/command/draft.go +++ b/internal/command/draft.go @@ -39,6 +39,7 @@ func init() { var draftCmd = &cobra.Command{ Use: "draft", Short: "DEPRECATED - use 'delta' instead - creates Humanitec deployment draft from the source SCORE file", + Long: deprecationMessage + "DEPRECATED - use 'delta' instead - creates Humanitec deployment draft from the source SCORE file", RunE: draft, } diff --git a/internal/command/root.go b/internal/command/root.go index 30c7d73..07200aa 100644 --- a/internal/command/root.go +++ b/internal/command/root.go @@ -19,10 +19,15 @@ var ( rootCmd = &cobra.Command{ Use: "score-humanitec", Short: "SCORE to Humanitec translator", - Long: `SCORE is a specification for defining environment agnostic configuration for cloud based workloads. + Long: deprecationMessage + `SCORE is a specification for defining environment agnostic configuration for cloud based workloads. This tool creates a Humanitec deployment from the SCORE specification. Complete documentation is available at https://score.dev`, Version: fmt.Sprintf("%s (build: %s; sha: %s)", version.Version, version.BuildTime, version.GitSHA), + PersistentPreRun: func(cmd *cobra.Command, args []string) { + // Setting the deprecation message here as setting it on the cmd + // will remove it from the help. + fmt.Fprint(cmd.ErrOrStderr(), deprecationMessage) + }, } ) diff --git a/internal/command/run.go b/internal/command/run.go index a687a41..555892b 100644 --- a/internal/command/run.go +++ b/internal/command/run.go @@ -52,6 +52,7 @@ func init() { var runCmd = &cobra.Command{ Use: "run", Short: "Translate the SCORE file to Humanitec deployment delta", + Long: deprecationMessage + "Translate the SCORE file to Humanitec deployment delta", RunE: run, }