From 1252f2b8d531162f913bd9c5c0dea30d65c093f9 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 20 Sep 2017 16:55:15 +0200 Subject: [PATCH 1/4] Use new helper to get coursier version --- project/Release.scala | 8 ++------ project/plugins.sbt | 3 --- project/project/plugins.sbt | 5 +---- project/project/project/plugins.sbt | 4 ++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/project/Release.scala b/project/Release.scala index 582221b92..599424a83 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -193,7 +193,7 @@ object Release { } - val coursierVersionPattern = s"(?m)^${Pattern.quote("def coursierVersion = \"")}[^${'"'}]*${Pattern.quote("\"")}$$".r + val coursierVersionPattern = s"(?m)^${Pattern.quote("def coursierVersion0 = \"")}[^${'"'}]*${Pattern.quote("\"")}$$".r val updatePluginsSbt = ReleaseStep { state => @@ -204,13 +204,9 @@ object Release { } val baseDir = Project.extract(state).get(baseDirectory.in(ThisBuild)) - val pluginsSbtFile = baseDir / "project" / "plugins.sbt" - val projectPluginsSbtFile = baseDir / "project" / "project" / "plugins.sbt" val projectProjectPluginsSbtFile = baseDir / "project" / "project" / "project" / "plugins.sbt" val files = Seq( - pluginsSbtFile, - projectPluginsSbtFile, projectProjectPluginsSbtFile ) @@ -223,7 +219,7 @@ object Release { case _ => sys.error(s"Found too many matches in $f") } - val newContent = coursierVersionPattern.replaceAllIn(content, "def coursierVersion = \"" + releaseVer + "\"") + val newContent = coursierVersionPattern.replaceAllIn(content, "def coursierVersion0 = \"" + releaseVer + "\"") Files.write(f.toPath, newContent.getBytes(StandardCharsets.UTF_8)) vcs.add(f.getAbsolutePath).!!(state.log) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 8090f5fa0..647ce6b66 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -20,9 +20,6 @@ libs ++= Seq( "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M5" ) -// important: this line is matched / substituted during releases (via sbt-release) -def coursierVersion = "1.0.0-RC12" - // required for just released things resolvers += Resolver.sonatypeRepo("releases") diff --git a/project/project/plugins.sbt b/project/project/plugins.sbt index 0f850ed59..b35516897 100644 --- a/project/project/plugins.sbt +++ b/project/project/plugins.sbt @@ -1,8 +1,5 @@ -addSbtPlugin("io.get-coursier" % "sbt-coursier" % coursierVersion) +addSbtCoursier addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.0") -// important: this line is matched / substituted during releases (via sbt-release) -def coursierVersion = "1.0.0-RC12" - // required for just released things resolvers += Resolver.sonatypeRepo("releases") diff --git a/project/project/project/plugins.sbt b/project/project/project/plugins.sbt index c7de6c969..b236eef23 100644 --- a/project/project/project/plugins.sbt +++ b/project/project/project/plugins.sbt @@ -1,7 +1,7 @@ -addSbtPlugin("io.get-coursier" % "sbt-coursier" % coursierVersion) +addSbtPlugin("io.get-coursier" % "sbt-coursier" % coursierVersion0) // important: this line is matched / substituted during releases (via sbt-release) -def coursierVersion = "1.0.0-RC12" +def coursierVersion0 = "1.0.0-RC12" // required for just released things resolvers += Resolver.sonatypeRepo("releases") From b5a4a7ab01ffa936500d3b22d0cc5c9001f8239c Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 20 Sep 2017 16:56:33 +0200 Subject: [PATCH 2/4] Update version in README Next commit fixes the release process for it to handle that --- README.md | 18 +++++++++--------- doc/README.md | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index dc8ef45d6..53af2467b 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Lastly, it can be used programmatically via its [API](#api) and has a Scala JS [ Enable the SBT plugin by adding ```scala -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC12") ``` to `~/.sbt/0.13/plugins/build.sbt` (enables it globally), or to the `project/plugins.sbt` file of an SBT project. Tested with SBT 0.13.8 / 0.13.9 / 0.13.11 / 0.13.12 / 0.13.13 / 0.13.15 / 0.13.16-M1 / 1.0.0-M5. @@ -111,8 +111,8 @@ $ ./coursier fetch org.apache.spark:spark-sql_2.11:1.6.1 com.twitter:algebird-sp Add to your `build.sbt` ```scala libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % "1.0.0-RC11", - "io.get-coursier" %% "coursier-cache" % "1.0.0-RC11" + "io.get-coursier" %% "coursier" % "1.0.0-RC12", + "io.get-coursier" %% "coursier-cache" % "1.0.0-RC12" ) ``` @@ -215,7 +215,7 @@ of the cache used by a particular project, in case you have any doubt about what Enable the SBT plugin globally by adding ```scala -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC12") ``` to `~/.sbt/0.13/plugins/build.sbt` @@ -368,7 +368,7 @@ The `bootstrap` generates tiny bootstrap launchers, able to pull their dependenc repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/coursier/coursier/blob/master/scripts/generate-launcher.sh) with a command like ``` $ ./coursier bootstrap \ - io.get-coursier:coursier-cli_2.11:1.0.0-RC11 \ + io.get-coursier:coursier-cli_2.11:1.0.0-RC12 \ -b -f -o coursier \ -M coursier.cli.Coursier ``` @@ -380,12 +380,12 @@ See `./coursier bootstrap --help` for a list of the available options. Add to your `build.sbt` ```scala libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % "1.0.0-RC11", - "io.get-coursier" %% "coursier-cache" % "1.0.0-RC11" + "io.get-coursier" %% "coursier" % "1.0.0-RC12", + "io.get-coursier" %% "coursier-cache" % "1.0.0-RC12" ) ``` -The first module, `"io.get-coursier" %% "coursier" % "1.0.0-RC11"`, mainly depends on +The first module, `"io.get-coursier" %% "coursier" % "1.0.0-RC12"`, mainly depends on `scalaz-core` (and only it, *not* `scalaz-concurrent` for example). It contains among others, definitions, mainly in [`Definitions.scala`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala), @@ -395,7 +395,7 @@ that expects to be given metadata, wrapped in any `Monad`, then feeds these to ` you the final `Resolution`, wrapped in the same `Monad` it was given input. This final `Resolution` has all the dependencies, including the transitive ones. -The second module, `"io.get-coursier" %% "coursier-cache" % "1.0.0-RC11"`, is precisely in charge of fetching +The second module, `"io.get-coursier" %% "coursier-cache" % "1.0.0-RC12"`, is precisely in charge of fetching these input metadata. It uses `scalaz.concurrent.Task` as a `Monad` to wrap them. It also fetches artifacts (JARs, etc.). It caches all of these (metadata and artifacts) on disk, and validates checksums too. diff --git a/doc/README.md b/doc/README.md index e721b698b..e0e327092 100644 --- a/doc/README.md +++ b/doc/README.md @@ -73,7 +73,7 @@ Lastly, it can be used programmatically via its [API](#api) and has a Scala JS [ Enable the SBT plugin by adding ```scala -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC12") ``` to `~/.sbt/0.13/plugins/build.sbt` (enables it globally), or to the `project/plugins.sbt` file of an SBT project. Tested with SBT 0.13.8 / 0.13.9 / 0.13.11 / 0.13.12 / 0.13.13 / 0.13.15 / 0.13.16-M1 / 1.0.0-M5. @@ -111,8 +111,8 @@ $ ./coursier fetch org.apache.spark:spark-sql_2.11:1.6.1 com.twitter:algebird-sp Add to your `build.sbt` ```scala libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % "1.0.0-RC11", - "io.get-coursier" %% "coursier-cache" % "1.0.0-RC11" + "io.get-coursier" %% "coursier" % "1.0.0-RC12", + "io.get-coursier" %% "coursier-cache" % "1.0.0-RC12" ) ``` @@ -242,7 +242,7 @@ of the cache used by a particular project, in case you have any doubt about what Enable the SBT plugin globally by adding ```scala -addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC11") +addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-RC12") ``` to `~/.sbt/0.13/plugins/build.sbt` @@ -397,7 +397,7 @@ The `bootstrap` generates tiny bootstrap launchers, able to pull their dependenc repositories on first launch. For example, the launcher of coursier is [generated](https://github.com/coursier/coursier/blob/master/scripts/generate-launcher.sh) with a command like ``` $ ./coursier bootstrap \ - io.get-coursier:coursier-cli_2.11:1.0.0-RC11 \ + io.get-coursier:coursier-cli_2.11:1.0.0-RC12 \ -b -f -o coursier \ -M coursier.cli.Coursier ``` @@ -409,12 +409,12 @@ See `./coursier bootstrap --help` for a list of the available options. Add to your `build.sbt` ```scala libraryDependencies ++= Seq( - "io.get-coursier" %% "coursier" % "1.0.0-RC11", - "io.get-coursier" %% "coursier-cache" % "1.0.0-RC11" + "io.get-coursier" %% "coursier" % "1.0.0-RC12", + "io.get-coursier" %% "coursier-cache" % "1.0.0-RC12" ) ``` -The first module, `"io.get-coursier" %% "coursier" % "1.0.0-RC11"`, mainly depends on +The first module, `"io.get-coursier" %% "coursier" % "1.0.0-RC12"`, mainly depends on `scalaz-core` (and only it, *not* `scalaz-concurrent` for example). It contains among others, definitions, mainly in [`Definitions.scala`](https://github.com/coursier/coursier/blob/master/core/shared/src/main/scala/coursier/core/Definitions.scala), @@ -424,7 +424,7 @@ that expects to be given metadata, wrapped in any `Monad`, then feeds these to ` you the final `Resolution`, wrapped in the same `Monad` it was given input. This final `Resolution` has all the dependencies, including the transitive ones. -The second module, `"io.get-coursier" %% "coursier-cache" % "1.0.0-RC11"`, is precisely in charge of fetching +The second module, `"io.get-coursier" %% "coursier-cache" % "1.0.0-RC12"`, is precisely in charge of fetching these input metadata. It uses `scalaz.concurrent.Task` as a `Monad` to wrap them. It also fetches artifacts (JARs, etc.). It caches all of these (metadata and artifacts) on disk, and validates checksums too. From 2c4c3aa3d36bc43f15c8046300d9c15dcdcefcf2 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 20 Sep 2017 16:57:31 +0200 Subject: [PATCH 3/4] Fix README updating in release process --- project/Release.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Release.scala b/project/Release.scala index 599424a83..27d8d586e 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -141,7 +141,7 @@ object Release { val savePreviousReleaseVersion = ReleaseStep { state => - val cmd = Seq(state.vcs.commandName, "tag", "-l") + val cmd = Seq(state.vcs.commandName, "tag", "--sort", "version:refname") val tag = scala.sys.process.Process(cmd) .!! From 24fa04d814ee4d4260858f77d3328f0e5186d2d2 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Wed, 20 Sep 2017 16:58:41 +0200 Subject: [PATCH 4/4] Update scala-native setup on Travis CI --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8564596bd..0aaed0b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,9 +20,8 @@ matrix: os: linux jdk: oraclejdk8 sudo: required - group: deprecated-2017Q3 before_install: - - curl https://raw.githubusercontent.com/scala-native/scala-native/v0.3.1/bin/travis_setup.sh | bash -x + - curl https://raw.githubusercontent.com/scala-native/scala-native/e9df70ce671c58f34eab530a44875d6f818ba8fe/bin/travis_setup.sh | bash -x services: - docker - env: SCALA_VERSION=2.10.6 PUBLISH=1