From 351c4a2450291bfe6d57ce4514a865f8019364a2 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 15:30:25 -0800 Subject: [PATCH 1/7] replace Travis-CI with GitHub Actions --- .github/workflows/ci.yml | 15 ++++++++ .github/workflows/cla.yml | 11 ++++++ .github/workflows/release.yml | 22 +++++++++++ .travis.yml | 22 ----------- admin/README.md | 69 ---------------------------------- admin/build.sh | 40 -------------------- admin/encryptEnvVars.sh | 11 ------ admin/genKeyPair.sh | 40 -------------------- admin/gpg.sbt | 2 - admin/publish-settings.sbt | 8 ---- admin/pubring.asc | 18 --------- admin/secring.asc.enc | Bin 1872 -> 0 bytes 12 files changed, 48 insertions(+), 210 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/cla.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml delete mode 100644 admin/README.md delete mode 100755 admin/build.sh delete mode 100755 admin/encryptEnvVars.sh delete mode 100755 admin/genKeyPair.sh delete mode 100644 admin/gpg.sbt delete mode 100644 admin/publish-settings.sbt delete mode 100644 admin/pubring.asc delete mode 100644 admin/secring.asc.enc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..f28e0cfea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +name: test +on: + push: +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + - uses: sbt/setup-sbt@v1 + - name: Test + run: sbt test publishLocal diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 000000000..3549dedc2 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,11 @@ +name: "Check Scala CLA" +on: + pull_request: +jobs: + cla-check: + runs-on: ubuntu-latest + steps: + - name: Verify CLA + uses: scala/cla-checker@v1 + with: + author: ${{ github.event.pull_request.user.login }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..1e5360b8a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release +on: + push: + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + - uses: sbt/setup-sbt@v1 + - run: sbt versionCheck ci-release + env: + PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} + PGP_SECRET: ${{secrets.PGP_SECRET}} + SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} + SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index da13dbfe3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: ~> 1.0 # needed for imports - -import: scala/scala-dev:travis/default.yml - -language: scala - -scala: 2.12.7 - -env: - global: - - ADOPTOPENJDK=8 - # PGP_PASSPHRASE - - secure: "HdhgvdpbCivSOQMKbjVCZKtlDnhJ4hGcIDQlUDop52gmXhLEkMQB97F1UO79VQiP1co0vRiDNS7OhsbMSf8tbX9etaoMizpEUiz2bAa6YflKn088Yfs2Xjo24mgqlQzY59W2eTvHQd3kAMXE3/rumEIpeFBJ6O5wVc9Y7rFhRK6Q1qC2h9u5cI8IGzl36W3c0Ybmc0Q7lZsTRNrsIsxSc8aAkyEYw2ooNP799xh7s5gvfbJzczlUPKRi/jxLJtMvIn0Wq6OgactFufpOAst7yhK2r878HSxCu2jdZfGfIlPT1z41RBCg09lBR7N9lbzK/OG/OL5tDpfK6wsbOCh4qfp3KNE5pcETqfmaVkJvoPswIfpzgved6KMPxLHkFfZSTXlDYJbfpnXbqhA7xG+tod7G9+8PJQ2/jUTpdrp3DAALKS1Unhk/mMfLsydfP/auGjIBAhqQJrd2rXwvR5plOXtDV4QC6Pj+JiUahm6TaC69l2pjhAeUyavXwFzE1dTXL2j2eZkLAb9XCw2oEnh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UzSUG2TI5MdlCxrTY8Ge+2lTZAPqWYCSirwWYGcQbHEpy2r477p/d3z9NpzM2t3p69jplNTocdrI8B2/P2Xs6FDwWTed3yRp3Bo3OasW5Trv4RsQO64vg6vNvPvhWoiE82CGZFDpyJUYPv4XVJz6i1CJPN1GRgchoHY5vxfogXtDPyYbwe+fpLNHTAhTnV5mMZ8HrkId+pfyY4ldtrtNTIsMvOSixGvmpLEepGLbmh1QcRQkzmW+wXy6+cyIPaTsFIj10FLId9HtB+ImpfadyrDbRKk5w18xp0+i5xFzG0Ov5vImB0omVg3jifH1IVL91LSRlvIQx952Kh0MfDlgIpgFN3eGuc58K0A/fgm8v9uHQBYxOE31mVT2J0zoVsrt5jJGA4tGBeexh+ftDXZy7g7qkuihTAUtLEqV6LgNSBpBK+dFNmnmqnlH/QBi1HFOJbBTOQ2YUwHKBuXzNdAK9U=" - -script: admin/build.sh - -notifications: - email: lukas.rytz@lightbend.com diff --git a/admin/README.md b/admin/README.md deleted file mode 100644 index 3e9d1bfa2..000000000 --- a/admin/README.md +++ /dev/null @@ -1,69 +0,0 @@ -## Tag Driven Releasing - -### Initial setup for the repository - -To configure tag driven releases from Travis CI. - - 1. Generate a key pair for this repository with `./admin/genKeyPair.sh`. - Edit `.travis.yml` and `admin/build.sh` as prompted. - 1. Publish the public key to https://pgp.mit.edu - 1. Store other secrets as encrypted environment variables with `./admin/encryptEnvVars.sh`. - Edit `.travis.yml` as prompted. - 1. Edit `.travis.yml` to use `./admin/build.sh` as the build script, - and edit that script to use the tasks required for this project. - Ensure that `RELEASE_COMBO` is `true` for build matrix combinations - that should be released to sonatype (when building a tag). - -It is important to add comments in `.travis.yml` to identify the name -of each environment variable encoded in a `secure` section. - -After these steps, your `.travis.yml` should contain config of the form: - -``` -language: scala - -jdk: - - openjdk6 - - oraclejdk8 - -scala: - - 2.11.12 - - 2.12.6 - -env: - global: - # PGP_PASSPHRASE - - secure: "XXXXXX" - # SONA_USER - - secure: "XXXXXX" - # SONA_PASS - - secure: "XXXXXX" - -script: admin/build.sh - -notifications: - email: - - a@b.com -``` - -If Sonatype credentials change in the future, step 3 can be repeated -without generating a new key. - -### Testing - - 1. Follow the release process below to create a dummy release (e.g., `v0.1.0-TEST1`). - Confirm that the release was staged to Sonatype but do not release it to Maven - central. Instead, drop the staging repository. - -### Performing a release - - 1. Create a GitHub "Release" with a corresponding tag (e.g., `v0.1.1`) via the GitHub - web interface. - 1. The release will be published using the Scala and JVM version combinations specified - in the travis build matrix where `[ "$RELEASE_COMBO" = "true" ]`. - - If you need to release against a different Scala version, create a new commit that modifies - `.travis.yml` and push a new tag, e.g., `v1.2.3#2.13.0-M5`. The suffix after `#` is ignored. - 1. Travis CI will schedule a build for this release. Review the build logs. - 1. Log into https://oss.sonatype.org/ and identify the staging repository. - 1. Sanity check its contents. - 1. Release staging repository to Maven and send out release announcement. diff --git a/admin/build.sh b/admin/build.sh deleted file mode 100755 index 0c01285a2..000000000 --- a/admin/build.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e - -# Builds of tagged revisions are published to sonatype staging. - -# Travis runs a build on new revisions and on new tags, so a tagged revision is built twice. -# Builds for a tag have TRAVIS_TAG defined, which we use for identifying tagged builds. -# Checking the local git clone would not work because git on travis does not fetch tags. - -# The version number to be published is extracted from the tag, e.g., v1.2.3 publishes -# version 1.2.3 on all combinations of the travis matrix where `[ "$RELEASE_COMBO" = "true" ]`. - -# In order to build a previously released version against a new (binary incompatible) Scala release, -# a new commit that modifies (and prunes) the Scala versions in .travis.yml needs to be added on top -# of the existing tag. Then a new tag can be created for that commit, e.g., `v1.2.3#2.13.0-M5`. -# Everything after the `#` in the tag name is ignored. - -RELEASE_COMBO=true - -verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?" -tagPat="^v$verPat(#.*)?$" - -if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then - tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//) - publishVersion='set every version := "'$tagVer'"' - if [ "$RELEASE_COMBO" = "true" ]; then - currentJvmVer=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/^1\.//' | sed 's/[^0-9].*//') - echo "Releasing $tagVer with Scala $TRAVIS_SCALA_VERSION on Java version $currentJvmVer." - publishTask="publish-signed" - cat admin/gpg.sbt >> project/plugins.sbt - cp admin/publish-settings.sbt . - # Copied from the output of genKeyPair.sh - K=$encrypted_6368ca85cfa9_key - IV=$encrypted_6368ca85cfa9_iv - openssl aes-256-cbc -K $K -iv $IV -in admin/secring.asc.enc -out admin/secring.asc -d - fi -fi - -sbt "++$TRAVIS_SCALA_VERSION" "$publishVersion" clean test publishLocal "$publishTask" diff --git a/admin/encryptEnvVars.sh b/admin/encryptEnvVars.sh deleted file mode 100755 index b62566798..000000000 --- a/admin/encryptEnvVars.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# -# Encrypt sonatype credentials so that they can be -# decrypted in trusted builds on Travis CI. -# -set -e - -read -s -p 'SONA_USER: ' SONA_USER -travis encrypt SONA_USER="$SONA_USER" -read -s -p 'SONA_PASS: ' SONA_PASS -travis encrypt SONA_PASS="$SONA_PASS" diff --git a/admin/genKeyPair.sh b/admin/genKeyPair.sh deleted file mode 100755 index aabeb167b..000000000 --- a/admin/genKeyPair.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Generates a key pair for this repository to sign artifacts. -# Encrypt the private key and its passphrase in trusted builds -# on Travis CI. -# -set -e - -# Based on https://gist.github.com/kzap/5819745: -function promptDelete() { - if [[ -f "$1" ]]; then - echo About to delete $1, Enter for okay / CTRL-C to cancel - read - rm "$1" - fi -} -for f in admin/secring.asc.enc admin/secring.asc admin/pubring.asc; do promptDelete "$f"; done - -echo Generating key pair. Please enter 1. repo name 2. scala-internals@googlegroups.com, 3. a new passphrase -echo Be careful when using special characters in the passphrase, see http://docs.travis-ci.com/user/encryption-keys/#Note-on-escaping-certain-symbols -cp admin/gpg.sbt project -sbt 'set pgpReadOnly := false' \ - 'set pgpPublicRing := file("admin/pubring.asc")' \ - 'set pgpSecretRing := file("admin/secring.asc")' \ - 'pgp-cmd gen-key' -rm project/gpg.sbt - -echo ============================================================================================ -echo Encrypting admin/secring.asc. Update K and IV variables in admin/build.sh accordingly. -echo ============================================================================================ -travis encrypt-file admin/secring.asc -rm admin/secring.asc -mv secring.asc.enc admin - -echo ============================================================================================ -echo Encrypting environment variables. Add each to a line in .travis.yml. Include a comment -echo with the name of the corresponding variable -echo ============================================================================================ -read -s -p 'PGP_PASSPHRASE: ' PGP_PASSPHRASE -travis encrypt PGP_PASSPHRASE="$PGP_PASSPHRASE" diff --git a/admin/gpg.sbt b/admin/gpg.sbt deleted file mode 100644 index 68ae46411..000000000 --- a/admin/gpg.sbt +++ /dev/null @@ -1,2 +0,0 @@ - -addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3") // only added when publishing, see build.sh diff --git a/admin/publish-settings.sbt b/admin/publish-settings.sbt deleted file mode 100644 index 026c6ee3e..000000000 --- a/admin/publish-settings.sbt +++ /dev/null @@ -1,8 +0,0 @@ -def env(key: String) = Option(System.getenv(key)).getOrElse("") - -inThisBuild(Seq( - pgpPassphrase := Some(env("PGP_PASSPHRASE").toArray), - pgpPublicRing := file("admin/pubring.asc"), - pgpSecretRing := file("admin/secring.asc"), - credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", env("SONA_USER"), env("SONA_PASS")) -)) diff --git a/admin/pubring.asc b/admin/pubring.asc deleted file mode 100644 index 0d645827a..000000000 --- a/admin/pubring.asc +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: BCPG v1.49 - -mQENBFm6iTwBCACgT230xyUVy3/YSEMJ5MJeDepARKBB/Vqg4tvIDvvjsuS+CH9t -ErpsZnGf5t7iw+nURNn3lYohSPdO2huezWScgCpJt5OH3uQ+ywp0J8cyYDyTIs4O -E224fAC0T0Tx/wT9OPWgyA7yuKvgJZ5fER/IszDrjgtxsKuy6lZMnF2U1LIIb4Tl -vIMki0Fkjr2fcu3n6cumY+9556Rj8/FJYhqG2iMAosG+u5HNEdiy1CdpBQAVqR6x -y4LdFrvwgAf128tmoGTRWBTRY/R1Dt+3PJm3EIPoCv/nIAogHUcAYpt13AiSrvYk -C5YN9cyZMI/du0LsZIv6Whpk9hwDhC+o5cQdABEBAAG0LHNjYWxhLWFzbSA8c2Nh -bGEtaW50ZXJuYWxzQGdvb2dsZWdyb3Vwcy5jb20+iQEcBBMBAgAGBQJZuok8AAoJ -EAHZuceVLEof5wAH/REb7QU1k1hvr0pOvbdTlB8Jwwns9FA/htSqPxhjO9zSYYKO -0Z6cbbGqva32rAG7GUAxm7ciNmveLyuNYtV3wujZtmgO/ZpU+3NvN5KPjuXTn5ta -7obfDqGJllZlEvJFqXbSmB0WheNou4nXsSIoVYXH3Rs8SddCoHVO3wnxV2sNm4Y4 -IY4iLovOhLPncalDD08RI3CuLTb/nvmL8VRbolF47Z9jO2YH79ZvkJvb7H1zO/By -qbMoRO9pZ+Y0fhMsQ+NAnBK71Y9jxKuQfGRrIURw948KHOrJsLr+Z5O1RzJ6654i -0p36SLdk2JAO3nHkAWePC0/CN6LE1KuNmbS9/po= -=oQR+ ------END PGP PUBLIC KEY BLOCK----- diff --git a/admin/secring.asc.enc b/admin/secring.asc.enc deleted file mode 100644 index f0fb78f5bb7ecb82ac8ff065b3754bd54a2b0c03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1872 zcmV-W2e0@$q_=dE3Ia{^i*_cPm`a96ex;;Nvs)y9OlM2B*X8Gec+JqCQSQi7vDX@% z-k@YIiR@bo1xh`&x)H!)K}*^Zdm?ylQ8N^ZFW?rF37;o@%FoP8#2XxiS0w{)M+4M3 z=;W$Mi&ROpD|zC?IcEx73~X2uGRpJ8LBJ;}hQ_{@2vDmXnk&mJT7#gx=h62&en9Tj zwBYUiG>5dQskbK|%JWaI-lwO3Ry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F@^ zAxH()y<&IzDXB}D&*foReYD&w_3W-pVYX;r+lho3!wH|9)F!d>yX!6g396ua?)^n% zpH7sPhpeu}^Tyj3iPc5a!q;VK#>nW=cmQFGEw@G2!qu_byd?BKbe=tN8f^R~dJ_rw z9PYoqlDiOl5($Pg8nqZ*qmdhQULxsQ>zlqB5KldXLu@|~Q<;AkyluE{<8If}TdHEH KvCVf(Kjtdl{HP!R From b99e8744ea783439862398de65d2501020639c03 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 15:34:56 -0800 Subject: [PATCH 2/7] wip --- project/build.properties | 2 +- project/plugins.sbt | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/project/build.properties b/project/build.properties index 8e682c526..e88a0d817 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.18 +sbt.version=1.10.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index 6fa2784f3..772616fa0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1 @@ -addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14") - -// Last version that works on Java 6 -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.9.0") From c50d0e18db97752b158ff9d43da38d7b36f97bd3 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 15:38:07 -0800 Subject: [PATCH 3/7] wip --- build.sbt | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/build.sbt b/build.sbt index 5889519cd..7fba8ffef 100644 --- a/build.sbt +++ b/build.sbt @@ -1,37 +1,9 @@ -import ScalaModulePlugin._ - -scalaModuleSettings -scalaModuleSettingsJVM - name := "scala-asm" -enablePlugins(GitVersioning) -lazy val AsmTag = """ASM_(\d+)_(\d+)(?:_(\d+))?(?:_([\w\d_]+))?(-\d+-[\w\d]+)?""".r -lazy val ScalaAsmTag = """v(.*)""".r -git.gitTagToVersionNumber := { - case AsmTag(maj, min, pat, suf, des) => - // map a git-describe version built from an asm tag to a compatible version number - val p = if (pat != null && pat != "") s".$pat" else "" - val s = if (suf != null && suf != "") s"-$suf" else "" - val d = if (des != null && des != "") des else "" - Some(s"$maj.$min$p$s$d") - case ScalaAsmTag(v) => - Some(v) - case v => - throw new Error(s"Cannot get version number from git-describe: $v") -} -git.useGitDescribe := true - -// No Scala sources, but still set some version. Need to set `crossScalaVersions` for the -// sbt-scala-module plugin, which will then set scalaVersion. -crossScalaVersions in ThisBuild := List("2.12.7") - // Otherwise the artifact has a dependency on scala-library autoScalaLibrary := false // Don't add `_` to the jar file name - it's a Java-only project, no Scala cross-versioning needed crossPaths := false -javacOptions in compile ++= Seq("-g", "-parameters") - -OsgiKeys.exportPackage := Seq(s"scala.tools.asm.*;version=${version.value}") +Compile / javacOptions ++= Seq("-g", "-parameters") From 5179cad1ee541ac02879e676a47d8145bb6bddbb Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 15:39:54 -0800 Subject: [PATCH 4/7] wip --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 7fba8ffef..94e8984ba 100644 --- a/build.sbt +++ b/build.sbt @@ -6,4 +6,4 @@ autoScalaLibrary := false // Don't add `_` to the jar file name - it's a Java-only project, no Scala cross-versioning needed crossPaths := false -Compile / javacOptions ++= Seq("-g", "-parameters") +Compile / compile / javacOptions ++= Seq("-g", "-parameters") From 4d1ad8a19172e16132707bf68f3be8dc8c675067 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 17:53:59 -0800 Subject: [PATCH 5/7] wip --- build.sbt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.sbt b/build.sbt index 94e8984ba..bbbe82c41 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,12 @@ name := "scala-asm" +organization := "org.scala-lang.modules" +sonatypeProfileName := "org.scala-lang" +homepage := Some(url("https://github.com/scala/scala-asm")) +licenses := Seq("BSD 3-clause" -> url("http://opensource.org/licenses/BSD-3-Clause")) +scmInfo := Some(ScmInfo(url("https://github.com/scala/scala-asm"), + "scm:git:git@github.com:scala/scala-asm.git")) + // Otherwise the artifact has a dependency on scala-library autoScalaLibrary := false From 35374bc1c4d507cfe02c6c63467c74dea42754ee Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 18:13:00 -0800 Subject: [PATCH 6/7] wip --- build.sbt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index bbbe82c41..517e07d68 100644 --- a/build.sbt +++ b/build.sbt @@ -1,16 +1,13 @@ -name := "scala-asm" +// build +autoScalaLibrary := false +crossPaths := false +Compile / compile / javacOptions ++= Seq("-g", "-parameters") +// publish +name := "scala-asm" organization := "org.scala-lang.modules" sonatypeProfileName := "org.scala-lang" homepage := Some(url("https://github.com/scala/scala-asm")) licenses := Seq("BSD 3-clause" -> url("http://opensource.org/licenses/BSD-3-Clause")) scmInfo := Some(ScmInfo(url("https://github.com/scala/scala-asm"), "scm:git:git@github.com:scala/scala-asm.git")) - -// Otherwise the artifact has a dependency on scala-library -autoScalaLibrary := false - -// Don't add `_` to the jar file name - it's a Java-only project, no Scala cross-versioning needed -crossPaths := false - -Compile / compile / javacOptions ++= Seq("-g", "-parameters") From 4a79ddcbcdca76c019485cf36df064ecebc47b9d Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Wed, 18 Dec 2024 18:18:17 -0800 Subject: [PATCH 7/7] wip --- build.sbt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sbt b/build.sbt index 517e07d68..4f05ea963 100644 --- a/build.sbt +++ b/build.sbt @@ -11,3 +11,6 @@ homepage := Some(url("https://github.com/scala/scala-asm")) licenses := Seq("BSD 3-clause" -> url("http://opensource.org/licenses/BSD-3-Clause")) scmInfo := Some(ScmInfo(url("https://github.com/scala/scala-asm"), "scm:git:git@github.com:scala/scala-asm.git")) + +// override sbt-dynver (sbt-ci-release brings it, but we don't want it) +version := "9.7.1-scala-1"