Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: xerial/sbt-pack
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15
Choose a base ref
...
head repository: xerial/sbt-pack
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.16
Choose a head ref
  • 12 commits
  • 10 files changed
  • 3 contributors

Commits on Nov 2, 2022

  1. Fix release step note

    xerial committed Nov 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d445a47 View commit details
  2. Update README.md

    xerial authored Nov 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eb986ec View commit details
  3. Use Scala 2.12.17 in test (#306)

    * Use Scala 2.12.17
    
    * sbt syntax fixes
    xerial authored Nov 2, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ddc56bd View commit details

Commits on Nov 3, 2022

  1. Update scalafmt-core to 3.6.1 (#310)

    * Update scalafmt-core to 3.6.1
    
    * Reformat with scalafmt 3.6.1
    
    Executed command: scalafmt --non-interactive
    
    * Add 'Reformat with scalafmt 3.6.1' to .git-blame-ignore-revs
    xerial-bot authored Nov 3, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    20a61fd View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    0c71f64 View commit details
  3. Update commons-compress to 1.22 (#308)

    * Update commons-compress to 1.22
    
    * Revert commit(s) 819be0d
    
    * Update commons-compress to 1.22
    xerial-bot authored Nov 3, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    andrzej-stencel Andrzej Stencel
    Copy the full SHA
    2f8e7db View commit details
  4. Update specs2-core to 4.18.0 (#312)

    * Update specs2-core to 4.18.0
    
    * Revert commit(s) d06a5aa
    
    * Update specs2-core to 4.18.0
    xerial-bot authored Nov 3, 2022
    Copy the full SHA
    5b07bbb View commit details
  5. Update slf4j-api to 2.0.3 (#311)

    * Update slf4j-api to 2.0.3
    
    * Revert commit(s) 7d70d1e
    
    * Update slf4j-api to 2.0.3
    
    * Revert commit(s) a63c5f5
    
    * Update slf4j-api to 2.0.3
    xerial-bot authored Nov 3, 2022
    Copy the full SHA
    4e77c56 View commit details
  6. Update sbt-pgp to 2.2.0 (#307)

    * Update sbt-pgp to 2.2.0
    
    * Revert commit(s) c85b843
    
    * Update sbt-pgp to 2.2.0
    xerial-bot authored Nov 3, 2022

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    ac1509d View commit details
  7. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bc978a1 View commit details
  8. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    24ee860 View commit details

Commits on Nov 4, 2022

  1. 0.16

    xerial committed Nov 4, 2022

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    AustinAbro321 Austin Abro
    Copy the full SHA
    bf66c65 View commit details
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.6.1
8bc6d72c02004bacb63f930d1a6afdb7bcd6386d
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.6.0
version = 3.6.1
project.layout = StandardConvention
runner.dialect = scala212
maxColumn = 120
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ Add `sbt-pack` plugin to your sbt configuration:
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "(version)")
```

Repository URL: http://repo1.maven.org/maven2/org/xerial/sbt/
Repository URL: https://repo1.maven.org/maven2/org/xerial/sbt/

#### Minimum configuration

@@ -249,8 +249,7 @@ For releasing:

```
$ ./sbt
# cross tests for sbt 0.13 and 1.1
> ^ scripted
> ^ publishSigned
> sonatypeReleaseAll
> scripted
> publishSigned
> sonatypeBundleRelease
```
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Release Notes

## 0.16
- Remove unnecessary dependencies to slf4j
- Upgrade various dependency versions

## 0.15
- Update dependencies to use scala-xml 2.x

13 changes: 7 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ name := "sbt-pack"
organizationHomepage := Some(new URL("http://xerial.org/"))
description := "A sbt plugin for packaging distributable Scala code"

publishMavenStyle := true
Test / publishArtifact := false
publishMavenStyle := true
Test / publishArtifact := false

pomIncludeRepository := { _ =>
false
@@ -32,9 +32,10 @@ scriptedLaunchOpts ++= {
Seq("-Dplugin.version=" + version.value)
}

testFrameworks += new TestFramework("wvlet.airspec.Framework")

libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.36",
"org.apache.commons" % "commons-compress" % "1.21",
"org.tukaani" % "xz" % "1.9",
"org.specs2" %% "specs2-core" % "4.17.0" % "test"
"org.wvlet.airframe" %% "airspec" % "22.11.0" % Test,
"org.apache.commons" % "commons-compress" % "1.22",
"org.tukaani" % "xz" % "1.9"
)
10 changes: 5 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.13")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4")
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.0-M7")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")

libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-pack/duplicate-jars/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> 'set version := "0.1"'
> pack
$ exists target/pack/lib/scala-library-2.12.15.jar
$ exists target/pack/lib/scala-library-2.12.17.jar
$ absent target/pack/lib/slf4j-api-1.7.2.jar
$ exists target/pack/lib/slf4j-api-1.7.6.jar
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-pack/min-project/test
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
> pack
$ exists target/pack/Makefile
$ exists target/pack/bin/hello
$ exists target/pack/lib/scala-library-2.12.15.jar
$ exists target/pack/lib/scala-library-2.12.17.jar
$ exec sh ./target/pack/bin/hello
> packArchive
$ exists target/min-project-0.1.tar.gz
> packInstall ../../local
$ exists local/bin/hello
$ exists local/min-project/min-project-0.1/lib/min-project-0.1.jar
$ exists local/min-project/min-project-0.1/lib/scala-library-2.12.15.jar
$ exists local/min-project/min-project-0.1/lib/scala-library-2.12.17.jar
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-pack/nested-project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "nested"

version in ThisBuild := "0.1"
ThisBuild / version := "0.1"

ThisBuild / scalaVersion := "2.12.17"

61 changes: 32 additions & 29 deletions src/test/scala/xerial/sbt/VersionStringSpec.scala
Original file line number Diff line number Diff line change
@@ -1,54 +1,57 @@
package xerial.sbt

import org.specs2.mutable.Specification
import wvlet.airspec.AirSpec
import xerial.sbt.pack.{DefaultVersionStringOrdering, VersionString}

class VersionStringSpec extends Specification {
import scala.math.Ordered.orderingToOrdered

class VersionStringSpec extends AirSpec {
implicit val versionStringOrdering = DefaultVersionStringOrdering

"VersionString" should {
"accept any string" in {
test("VersionString") {
test("accept any string") {
VersionString("1.0")
VersionString("1.0-alpha")
VersionString("1")
VersionString("-alpha")
VersionString("1231892")
VersionString("asd;.a2,.-")

ok
}

"properly deconstruct arbitrary string" in {
VersionString("1") === VersionString.fromNumbers(1 :: Nil, None)
VersionString("1.2") === VersionString.fromNumbers(1 :: 2 :: Nil, None)
VersionString("1.2.3") === VersionString.fromNumbers(1 :: 2 :: 3 :: Nil, None)
VersionString("1.2.3.4") === VersionString.fromNumbers(1 :: 2 :: 3 :: 4 :: Nil, None)
VersionString("1.2.3.4-alpha") === VersionString.fromNumbers(1 :: 2 :: 3 :: 4 :: Nil, Some("alpha"))
VersionString("1.2.3.4-alpha-beta") === VersionString.fromNumbers(1 :: 2 :: 3 :: 4 :: Nil, Some("alpha-beta"))
VersionString("foo") === VersionString(List.empty[String], Some("foo"))
VersionString("foo.bar") === VersionString(List.empty[String], Some("foo.bar"))
VersionString("foo.bar-alpha") === VersionString(List.empty[String], Some("foo.bar-alpha"))
test("properly deconstruct arbitrary string") {
VersionString("1") shouldBe VersionString.fromNumbers(1 :: Nil, None)
VersionString("1.2") shouldBe VersionString.fromNumbers(1 :: 2 :: Nil, None)
VersionString("1.2.3") shouldBe VersionString.fromNumbers(1 :: 2 :: 3 :: Nil, None)
VersionString("1.2.3.4") shouldBe VersionString.fromNumbers(1 :: 2 :: 3 :: 4 :: Nil, None)
VersionString("1.2.3.4-alpha") shouldBe VersionString.fromNumbers(1 :: 2 :: 3 :: 4 :: Nil, Some("alpha"))
VersionString("1.2.3.4-alpha-beta") shouldBe VersionString.fromNumbers(
1 :: 2 :: 3 :: 4 :: Nil,
Some("alpha-beta")
)
VersionString("foo") shouldBe VersionString(List.empty[String], Some("foo"))
VersionString("foo.bar") shouldBe VersionString(List.empty[String], Some("foo.bar"))
VersionString("foo.bar-alpha") shouldBe VersionString(List.empty[String], Some("foo.bar-alpha"))
}

"properly sort" in {
VersionString("1") must be_<(VersionString("1.2.3.4"))
VersionString("2") must be_>(VersionString("1.2.3.4"))
VersionString("1.2.2") must be_<(VersionString("1.2.3.4"))
VersionString("1.2.4") must be_>(VersionString("1.2.3.4"))
VersionString("1.2.3.4.5") must be_>(VersionString("1.2.3.4"))
test("properly sort") {
VersionString("1") < VersionString("1.2.3.4") shouldBe true
VersionString("2") > VersionString("1.2.3.4") shouldBe true
VersionString("1.2.2") < VersionString("1.2.3.4") shouldBe true
VersionString("1.2.4") > VersionString("1.2.3.4") shouldBe true
VersionString("1.2.3.4.5") > VersionString("1.2.3.4") shouldBe true

VersionString("2.9.2") must be_<(VersionString("2.10.4"))
VersionString("2.9.2") < VersionString("2.10.4") shouldBe true

VersionString("1.2") must be_>(VersionString("1.2-alpha"))
VersionString("1.2-beta") must be_>(VersionString("1.2-alpha"))
VersionString("1.2") > VersionString("1.2-alpha") shouldBe true
VersionString("1.2-beta") > VersionString("1.2-alpha") shouldBe true

VersionString("apple") must be_<(VersionString("pie"))
VersionString("apple") < VersionString("pie") shouldBe true
}

"preserve 0-padding in version strings" in {
test("preserve 0-padding in version strings") {
val v = VersionString("1.09")
v.major mustEqual "1"
v.minor mustEqual Some("09")
v.major shouldBe "1"
v.minor shouldBe Some("09")
}
}
}