diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 22ec417fc..2b0f6738f 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -3,8 +3,6 @@ on: push: branches: - master - tags: - - "*" pull_request: branches: - master diff --git a/build.sc b/build.sc index 9cf4abb63..dcae58a7d 100644 --- a/build.sc +++ b/build.sc @@ -6,7 +6,7 @@ import $ivy.`io.get-coursier::coursier-launcher:2.0.0-RC6-10` val isMasterCommit = sys.env.get("GITHUB_REPOSITORY") == Some("lihaoyi/Ammonite") && - sys.env.get("GITHUB_REF").exists(x => x.endsWith("/master") || x.startsWith("refs/tags/")) + sys.env.get("GITHUB_REF").exists(x => x.endsWith("/master")) val latestTaggedVersion = os.proc('git, 'describe, "--abbrev=0", "--tags").call().out.trim @@ -33,11 +33,17 @@ val fullCrossScalaVersions = Seq( val latestAssemblies = binCrossScalaVersions.map(amm(_).assembly) println("GITHUB REF " + sys.env.get("GITHUB_REF")) -val (buildVersion, unstable) = sys.env.get("GITHUB_REF") match{ - case Some(s"refs/tags/$tagName") => (tagName, false) - case _ => + +val (buildVersion, unstable) = scala.util.Try( + os.proc('git, 'describe, "--exact-match", "--tags", "--always", gitHead) + .call() + .out + .trim +).toOption match{ + case None => val gitHash = os.proc("git", "rev-parse", "--short", "HEAD").call().out.trim (s"$latestTaggedVersion-$commitsSinceTaggedVersion-$gitHash", true) + case Some(tagName) => (tagName, false) } val bspVersion = "2.0.0-M6" diff --git a/readme/Footer.scalatex b/readme/Footer.scalatex index 0ca991e54..eeee61927 100644 --- a/readme/Footer.scalatex +++ b/readme/Footer.scalatex @@ -123,7 +123,7 @@ @sect{Changelog} - @sect{2.3.6} + @sect{2.3.7} @ul @li Replace the built in @code{@@main} method functionality with the