From c2ea31f182b8f337eb94eadbf073c50068e41ef6 Mon Sep 17 00:00:00 2001 From: Ioanna Kokkini Date: Thu, 21 Dec 2023 17:29:49 +0000 Subject: [PATCH 1/5] Update README After https://github.com/guardian/targeting-client/pull/37 `targeting-client` supports multiple Play versions concurrently. PR #37 also changed the group id and added `release.yml`. The new workflow performs releases using this library: https://github.com/guardian/gha-scala-library-release-workflow. This PR updates the `README` to reflect these changes. --- README.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cbf0ac5..3fa41f9 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,27 @@ This repository contains shared code used by targeting, frontend, and MAPI to create and process targeted campaigns. -# Version mapping - -|Targeting Client Version|Play Version|Scala Version |Artefact | -|------------------------|------------|------------------|----------------------------------------------------| -|0.14.8 |2.6 |2.11 & 2.12 |`"com.gu" %% "targeting-client-play26" % "0.14.8"` | -|1.0.x |2.7 |2.11 & 2.12 & 2.13|`"com.gu" %% "targeting-client" % "1.0.0"` | -|1.1.x |2.8 |2.12 & 2.13 |`"com.gu" %% "targeting-client" % "1.1.0"` | +Versions +-------- + +### Supported Play Versions + +* Play **3.0** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v30/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/) + ``` + libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v30" % "[maven version number]" + ``` +* Play **2.8** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/) + ``` + libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v28" % "[maven version number]" + ``` +* Play **2.7** : use [![targeting-client artifacts](https://img.shields.io/badge/targeting--client_--_JVM-1.0.0_(Scala_2.13,_2.12,_2.11)-green.svg)](https://index.scala-lang.org/guardian/grid/targeting-client) + ``` + libraryDependencies += "com.gu" %% "targeting-client" % "[maven version number]" + ``` +* Play **2.6** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client-play26/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client-play26) + ``` + libraryDependencies += "com.gu" %% "targeting-client" % "[maven version number]" + ``` # Usage @@ -36,5 +50,4 @@ Campaign types are expressed as a set of fields. To add a new set of fields edit # Publishing a new version -1. Get access to oss.sonatype.org (ask a Dev Manager/team member if unsure on this - there is a []doc on this](https://docs.google.com/document/d/1M_MiE8qntdDn97QIRnIUci5wdVQ8_defCqpeAwoKY8g/edit#heading=h.7n25tzj28wmr)) -2. Run `sbt release` +This repo is using the [`gha-scala-library-release-workflow`](https://github.com/guardian/gha-scala-library-release-workflow) library. Detailed instructions for how to release a new version can be found [here](https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/making-a-release.md). From 6288c8f43863b477cdce51d3ff864e4f9c0dadbc Mon Sep 17 00:00:00 2001 From: Ioanna Kokkini Date: Fri, 15 Mar 2024 12:17:08 +0000 Subject: [PATCH 2/5] Update README.md Co-authored-by: Roberto Tyley --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3fa41f9..5fe76c8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Versions ### Supported Play Versions -* Play **3.0** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v30/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/) +* Play **3.0** : use [![client-play-json-v30 Scala version support](https://index.scala-lang.org/guardian/targeting-client/client-play-json-v30/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/guardian/targeting-client/client-play-json-v30) ``` libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v30" % "[maven version number]" ``` From 7d6ba22bc0a603faf54c90ed83f9a661cb8bf2f6 Mon Sep 17 00:00:00 2001 From: Ioanna Kokkini Date: Fri, 15 Mar 2024 12:17:20 +0000 Subject: [PATCH 3/5] Update README.md Co-authored-by: Roberto Tyley --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fe76c8..8e9f4d7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Versions ``` libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v30" % "[maven version number]" ``` -* Play **2.8** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client/client-play-json-v28/) +* Play **2.8** : use [![client-play-json-v28 Scala version support](https://index.scala-lang.org/guardian/targeting-client/client-play-json-v28/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/guardian/targeting-client/client-play-json-v28) ``` libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v28" % "[maven version number]" ``` From 2801ebf765054efed462f8270068bca0c9b19882 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Fri, 15 Mar 2024 12:19:10 +0000 Subject: [PATCH 4/5] Update README.md --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 8e9f4d7..b81bd64 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,6 @@ Versions ``` libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v28" % "[maven version number]" ``` -* Play **2.7** : use [![targeting-client artifacts](https://img.shields.io/badge/targeting--client_--_JVM-1.0.0_(Scala_2.13,_2.12,_2.11)-green.svg)](https://index.scala-lang.org/guardian/grid/targeting-client) - ``` - libraryDependencies += "com.gu" %% "targeting-client" % "[maven version number]" - ``` -* Play **2.6** : use [![targeting-client artifacts](https://index.scala-lang.org/guardian/grid/targeting-client-play26/latest-by-scala-version.svg)](https://index.scala-lang.org/guardian/grid/targeting-client-play26) - ``` - libraryDependencies += "com.gu" %% "targeting-client" % "[maven version number]" - ``` # Usage From 0909639357749f4d9c059b96a791defd44a73153 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Fri, 15 Mar 2024 12:21:27 +0000 Subject: [PATCH 5/5] Remove old Usage instructions --- README.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b81bd64..f0a83f7 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,6 @@ Versions libraryDependencies += "com.gu.targeting-client" %% "client-play-json-v28" % "[maven version number]" ``` -# Usage - -To use this library add the following to your dependency libraries in your projects `build.sbt`: - -`"com.gu" %% "targeting-client" % "1.1.0"` - -Instead of version `0.1.0` insert the version you'd like to use (probably the latest). - - # Adding a new Campaign Type Campaign types are expressed as a set of fields. To add a new set of fields edit the Fields.scala file in the following way. I'll use the example set of a charity drive campaign. @@ -40,6 +31,8 @@ Campaign types are expressed as a set of fields. To add a new set of fields edit > \* Note: you cannot have a variable called `_type` since the JSON serializers use this string in order to know what type of field is being read. -# Publishing a new version +# Publishing a new release -This repo is using the [`gha-scala-library-release-workflow`](https://github.com/guardian/gha-scala-library-release-workflow) library. Detailed instructions for how to release a new version can be found [here](https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/making-a-release.md). +This repo uses [`gha-scala-library-release-workflow`](https://github.com/guardian/gha-scala-library-release-workflow) +to automate publishing releases (both full & preview releases) - see +[**Making a Release**](https://github.com/guardian/gha-scala-library-release-workflow/blob/main/docs/making-a-release.md).