From afd4e7cdd2279d5446d1269bd91caa5167f541a5 Mon Sep 17 00:00:00 2001 From: Carlos Quiroz Date: Tue, 10 Dec 2019 10:25:48 -0300 Subject: [PATCH] Prepare release 1.6 Signed-off-by: Carlos Quiroz --- .github/workflows/create-release.yml | 29 ++++++++++++++++++ README.md | 46 ++++++++++++++-------------- build.sbt | 4 +-- project/Build.scala | 16 +++++----- shared/src/main/tut/README.md | 24 +++++++-------- 5 files changed, 75 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 00000000..d208bb48 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,29 @@ +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Create Release + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release: + * First Change + * Second Change + draft: false + prerelease: false diff --git a/README.md b/README.md index cf41066f..c433b8e2 100644 --- a/README.md +++ b/README.md @@ -15,17 +15,17 @@ All types are immutable and thread-safe. | [![Join the chat at https://gitter.im/typelevel/squants](https://badges.gitter.im/typelevel/squants.svg)](https://gitter.im/typelevel/squants?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | -[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.12.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.12/1.5.0/squants/index.html) +[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.13.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.13/1.6.0/squants/index.html) | [![Build Status](https://travis-ci.org/typelevel/squants.png?branch=master)](https://travis-ci.org/typelevel/squants) ### Current Versions -Current Release: **1.5.0** -([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.12/1.5.0/squants_2.12-1.5.0-javadoc.jar/!/index.html#squants.package)) +Current Release: **1.6.0** +([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.13/1.6.0/squants_2.13-1.6.0-javadoc.jar/!/index.html#squants.package)) -Development Build: **1.6.0-SNAPSHOT** -([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.12/1.6.0-SNAPSHOT/squants_2.12-1.6.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package)) +Development Build: **1.7.0-SNAPSHOT** +([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.13/1.6.0-SNAPSHOT/squants_2.13-1.7.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package)) [Release History](https://github.com/typelevel/squants/wiki/Release-History) @@ -38,10 +38,10 @@ For more information on feature availability of a specific version see the Relea Repository hosting for Squants is provided by [Sonatype](https://oss.sonatype.org/). To use Squants in your SBT project add the following dependency to your build. - "org.typelevel" %% "squants" % "1.5.0" + "org.typelevel" %% "squants" % "1.6.0" or - "org.typelevel" %% "squants" % "1.6.0-SNAPSHOT" + "org.typelevel" %% "squants" % "1.7.0-SNAPSHOT" To use Squants in your Maven project add the following dependency @@ -50,13 +50,13 @@ To use Squants in your Maven project add the following dependency org.typelevel squants_2.11 - 1.5.0 + 1.6.0 ``` Beginning with Squants 0.4.x series, both Scala 2.10 and 2.11 builds are available. -Beginning with Squants 1.x series, Scala 2.10, 2.11 and 2.12 builds are available. -Scala.js is supported on version 0.6.28 and 1.0.0-M8 +Beginning with Squants 1.x series, Scala 2.11, 2.12 and 2.13 builds are available. +Scala.js is supported on version 0.6.31 and 1.0.0-RC1 To use Squants interactively in the Scala REPL, clone the git repo and run `sbt squantsJVM/console` @@ -692,7 +692,7 @@ This will fail because `lower` = `upper`: scala> QuantityRange(1.km, 1.km) java.lang.IllegalArgumentException: QuantityRange upper bound must be strictly greater than to the lower bound at squants.QuantityRange.(QuantityRange.scala:25) - ... 44 elided + ... 43 elided ``` `QuantityRange` contains two functions that check if an element is part of the range, `contains` and `includes`. @@ -963,7 +963,7 @@ import squants.experimental.unitgroups.si.strict.implicits._ // import squants.experimental.unitgroups.si.strict.implicits._ val siLengths: UnitGroup[Length] = implicitly[UnitGroup[Length]] -// siLengths: squants.experimental.unitgroups.UnitGroup[squants.space.Length] = squants.experimental.unitgroups.si.strict.package$implicits$$anon$1@3bd46477 +// siLengths: squants.experimental.unitgroups.UnitGroup[squants.space.Length] = squants.experimental.unitgroups.si.strict.package$implicits$$anon$1@f52ca1b ``` To print out units and their conversion factors to the primary SI unit, you could use this code: @@ -1020,16 +1020,16 @@ val usCookingUnitGroup = new UnitGroup[Volume] { // units don't have to be specified in-order. val units: Set[UnitOfMeasure[Volume]] = Set(UsPints, UsGallons, Teaspoons, Tablespoons, UsQuarts, FluidOunces) } -// usCookingUnitGroup: squants.experimental.unitgroups.UnitGroup[squants.space.Volume]{val units: Set[squants.UnitOfMeasure[squants.space.Volume]]} = $anon$1@13cf78bc +// usCookingUnitGroup: squants.experimental.unitgroups.UnitGroup[squants.space.Volume]{val units: Set[squants.UnitOfMeasure[squants.space.Volume]]} = $anon$1@495c28e0 // squants automatically sorts units usCookingUnitGroup.sortedUnits.foreach(println) -// squants.space.Teaspoons$@754c402e -// squants.space.Tablespoons$@41f51dac -// squants.space.FluidOunces$@4151520 -// squants.space.UsPints$@297ee46f -// squants.space.UsQuarts$@1f76d461 -// squants.space.UsGallons$@5f688205 +// squants.space.Teaspoons$@1f2aa9fd +// squants.space.Tablespoons$@20a4318e +// squants.space.FluidOunces$@3f31c22 +// squants.space.UsPints$@6b5332c3 +// squants.space.UsQuarts$@5293da73 +// squants.space.UsGallons$@25de9dee ``` The `UnitGroup` values provided with Squants are only samples and aren't intended to be exhaustive. @@ -1065,7 +1065,7 @@ import squants.experimental.unitgroups.misc.AstronomicalLengthUnitGroup Then create the formatter by passing in a unit group: ```scala val astroFormatter = new DefaultFormatter(AstronomicalLengthUnitGroup) -// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@4a75b2e0 +// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@790fe346 ``` Now, we create some values using human-unfriendly numbers: @@ -1117,7 +1117,7 @@ import squants.experimental.unitgroups.misc.AstronomicalLengthUnitGroup ```scala implicit val astroFormatter = new DefaultFormatter(AstronomicalLengthUnitGroup) -// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@679fbbc2 +// astroFormatter: squants.experimental.formatter.DefaultFormatter[squants.space.Length] = squants.experimental.formatter.DefaultFormatter@135301a1 val earthToJupiter = 588000000.km // earthToJupiter: squants.space.Length = 588000000.0 km @@ -1552,9 +1552,9 @@ To make a release do the following: sbt squantsNative/publishSigned ``` -* Repeat for scala.js 1.0.0-M8 +* Repeat for scala.js 1.0.0-RC1 ``` - SCALAJS_VERSION=1.0.0-M8 sbt +squantsJS/publishSigned + SCALAJS_VERSION=1.0.0-RC1 sbt +squantsJS/publishSigned ``` * Then make a release (Note: after this step the release cannot be replaced) diff --git a/build.sbt b/build.sbt index fecf091c..906a5f43 100644 --- a/build.sbt +++ b/build.sbt @@ -28,13 +28,13 @@ lazy val squants = parallelExecution in Test := false ) .jvmSettings(Tests.defaultSettings: _*) - .jsSettings(Tests.defaultSettings: _*) .jsSettings( parallelExecution in Test := false, excludeFilter in Test := "*Serializer.scala" || "*SerializerSpec.scala", scalacOptions in Tut --= Seq("-Ywarn-unused-import", "-Ywarn-unused:imports"), - sources in (Compile, test) := List() // This is a pity but we can't reliable compile on 1.0.0-M8 + // sources in (Compile, test) := List() // This is a pity but we can't reliable compile on 1.0.0-M8 ) + .jsSettings(Tests.defaultSettings: _*) .nativeSettings( sources in (Compile, doc) := List(), // Can't build docs in native sources in (Compile, test) := List() // Can't yet compile in native diff --git a/project/Build.scala b/project/Build.scala index e8333a1c..c04b6f04 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -7,7 +7,7 @@ import com.typesafe.sbt.osgi.SbtOsgi import com.typesafe.sbt.osgi.SbtOsgi.autoImport._ object Versions { - val Squants = "1.6.0-SNAPSHOT" + val Squants = "1.6.0" val Scala = "2.11.12" // Don't use 2.12 yet to avoid troubles with native val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.31") @@ -126,12 +126,14 @@ object Publish { object Tests { val defaultSettings = - Seq( - libraryDependencies ++= - Dependencies.scalaTest.value ++ - Dependencies.scalaCheck.value ++ - Dependencies.json4s.value - ) + if (Versions.scalaJSVersion.startsWith("0.6")) { + Seq( + libraryDependencies ++= + Dependencies.scalaTest.value ++ + Dependencies.scalaCheck.value ++ + Dependencies.json4s.value + ) + } else Seq.empty } object Formatting { diff --git a/shared/src/main/tut/README.md b/shared/src/main/tut/README.md index 9106668e..4f22cc65 100644 --- a/shared/src/main/tut/README.md +++ b/shared/src/main/tut/README.md @@ -15,17 +15,17 @@ All types are immutable and thread-safe. | [![Join the chat at https://gitter.im/typelevel/squants](https://badges.gitter.im/typelevel/squants.svg)](https://gitter.im/typelevel/squants?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | -[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.12.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.12/1.5.0/squants/index.html) +[![Scaladocs](https://www.javadoc.io/badge/org.typelevel/squants_2.13.svg?label=scaladoc)](https://static.javadoc.io/org.typelevel/squants_2.13/1.6.0/squants/index.html) | [![Build Status](https://travis-ci.org/typelevel/squants.png?branch=master)](https://travis-ci.org/typelevel/squants) ### Current Versions -Current Release: **1.5.0** -([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.12/1.5.0/squants_2.12-1.5.0-javadoc.jar/!/index.html#squants.package)) +Current Release: **1.6.0** +([API Docs](https://oss.sonatype.org/service/local/repositories/releases/archive/org/typelevel/squants_2.13/1.6.0/squants_2.13-1.6.0-javadoc.jar/!/index.html#squants.package)) -Development Build: **1.6.0-SNAPSHOT** -([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.12/1.6.0-SNAPSHOT/squants_2.12-1.6.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package)) +Development Build: **1.7.0-SNAPSHOT** +([API Docs](https://oss.sonatype.org/service/local/repositories/snapshots/archive/org/typelevel/squants_2.13/1.6.0-SNAPSHOT/squants_2.13-1.7.0-SNAPSHOT-javadoc.jar/!/index.html#squants.package)) [Release History](https://github.com/typelevel/squants/wiki/Release-History) @@ -38,10 +38,10 @@ For more information on feature availability of a specific version see the Relea Repository hosting for Squants is provided by [Sonatype](https://oss.sonatype.org/). To use Squants in your SBT project add the following dependency to your build. - "org.typelevel" %% "squants" % "1.5.0" + "org.typelevel" %% "squants" % "1.6.0" or - "org.typelevel" %% "squants" % "1.6.0-SNAPSHOT" + "org.typelevel" %% "squants" % "1.7.0-SNAPSHOT" To use Squants in your Maven project add the following dependency @@ -50,13 +50,13 @@ To use Squants in your Maven project add the following dependency org.typelevel squants_2.11 - 1.5.0 + 1.6.0 ``` Beginning with Squants 0.4.x series, both Scala 2.10 and 2.11 builds are available. -Beginning with Squants 1.x series, Scala 2.10, 2.11 and 2.12 builds are available. -Scala.js is supported on version 0.6.28 and 1.0.0-M8 +Beginning with Squants 1.x series, Scala 2.11, 2.12 and 2.13 builds are available. +Scala.js is supported on version 0.6.31 and 1.0.0-RC1 To use Squants interactively in the Scala REPL, clone the git repo and run `sbt squantsJVM/console` @@ -1205,9 +1205,9 @@ To make a release do the following: sbt squantsNative/publishSigned ``` -* Repeat for scala.js 1.0.0-M8 +* Repeat for scala.js 1.0.0-RC1 ``` - SCALAJS_VERSION=1.0.0-M8 sbt +squantsJS/publishSigned + SCALAJS_VERSION=1.0.0-RC1 sbt +squantsJS/publishSigned ``` * Then make a release (Note: after this step the release cannot be replaced)