This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new a7676ef1b allow test with pekko 1.0.x snapshot (#333)
a7676ef1b is described below
commit a7676ef1b60cb718d88b327d16587ca15280bc7b
Author: PJ Fanning <[email protected]>
AuthorDate: Sun Oct 29 22:20:04 2023 +0000
allow test with pekko 1.0.x snapshot (#333)
* allow test with pekko 1.0.x snapshot
* Update PekkoDependency.scala
* Update PekkoDependency.scala
* rename config value to `1.0.x`
* Update nightly.yml to include 1.0.x run
* Update PekkoDependency.scala
---
.github/workflows/nightly.yml | 2 +-
project/PekkoDependency.scala | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 0b69cc3d0..3dd87ca9f 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -15,7 +15,7 @@ jobs:
matrix:
SCALA_VERSION: [2.12, 2.13, 3]
JDK: [8, 11, 17, 21]
- PEKKO_VERSION: [default, main]
+ PEKKO_VERSION: ['default', 'main', '1.0.x']
steps:
- name: Checkout
uses: actions/checkout@v4
diff --git a/project/PekkoDependency.scala b/project/PekkoDependency.scala
index 3af4b4c0d..bc78124ef 100644
--- a/project/PekkoDependency.scala
+++ b/project/PekkoDependency.scala
@@ -44,6 +44,7 @@ object PekkoDependency {
case None =>
Option(System.getProperty("pekko.http.build.pekko.version")) match {
case Some("main") => mainSnapshot
+ case Some("1.0.x") => snapshot10x
case Some("default") | None => Artifact(defaultVersion)
case Some(other) => Artifact(other, true)
}
@@ -55,6 +56,7 @@ object PekkoDependency {
val default = pekkoDependency(defaultVersion = minimumExpectedPekkoVersion)
def docs = default
+ lazy val snapshot10x = Artifact(determineLatestSnapshot("1.0"), true)
lazy val mainSnapshot = Artifact(determineLatestSnapshot(), true)
val pekkoVersion: String = default match {
@@ -106,6 +108,8 @@ object PekkoDependency {
s"${Resolver.ApacheMavenSnapshotsRepo.root}org/apache/pekko/pekko-cluster-sharding-typed_2.13/")),
10.seconds).bodyAsString
+ // we use tagNumber set as Integer.MAX_VALUE when there is no tagNumber
+ // this ensures that RC and Milistone versions are treated as older than
non-RC/non-milestone versions
val allVersions =
snapshotVersionR.findAllMatchIn(body)
.map {
@@ -114,11 +118,12 @@ object PekkoDependency {
ep.toInt,
maj.toInt,
min.toInt,
- Option(tagNumber).map(_.toInt),
+ Option(tagNumber).map(_.toInt).getOrElse(Integer.MAX_VALUE),
offset.toInt) -> full
}
.filter(_._2.startsWith(prefix))
.toVector.sortBy(_._1)
+
allVersions.last._2
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]