Skip to content

Commit fd5405d

Browse files
committed
Upgrade to scala 2.13.2
1 parent 0f65fa9 commit fd5405d

File tree

7 files changed

+51
-38
lines changed

7 files changed

+51
-38
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v2
24-
- name: Asdf install
25-
uses: asdf-vm/actions/[email protected]
2624
- name: Test
27-
run: mill -i fastparse_ext.test
25+
run: ./ci test
2826

2927
jitpack-commit:
3028
needs: test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
out/
2-
.idea/
2+
.idea*
3+
.metals/
4+
.bloop/
5+
cs
6+

.tool-versions

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
graalvm 19.0.2
2-
mill 0.6.1
3-
scala 2.13.1
2+
scala 2.13.2

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
1.0.1

build.sc

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
// -*- mode: scala -*-
22

3-
// Dont use sonatype's maven-central as it timeouts in travis.
4-
// interp.repositories() =
5-
// List(coursierapi.Repository("https://jcenter.bintray.com"))
6-
// @
7-
83
import mill._, scalalib._, publish._
94

10-
object fastparse_ext extends ScalaModule with PublishModule {
11-
def publishVersion = os.read(os.pwd / "VERSION").trim
12-
13-
// use versions installed from .tool-versions
14-
def scalaVersion = scala.util.Properties.versionNumberString
15-
def millVersion = System.getProperty("MILL_VERSION")
5+
val crossVersions = Seq("2.13.2", "2.12.11")
166

17-
def artifactName = "fastparse_ext"
18-
19-
def m2 = T {
20-
val pa = publishArtifacts()
21-
val wd = T.ctx().dest
22-
val ad = pa.meta.group.split("\\.").foldLeft(wd)((a, b) => a / b) / pa.meta.id / pa.meta.version
23-
os.makeDir.all(ad)
24-
pa.payload.map { case (f,n) => os.copy(f.path, ad/n) }
25-
}
7+
object fastparse_ext extends Cross[FastparseExt](crossVersions: _*)
8+
class FastparseExt(val crossScalaVersion: String) extends CrossScalaModule with PublishModule {
9+
def publishVersion = os.read(os.pwd / "VERSION").trim
10+
def artifactName = "fastparse_ext"
2611

2712
def pomSettings = PomSettings(
2813
description = "Utility extensions for fastparse",
@@ -38,7 +23,7 @@ object fastparse_ext extends ScalaModule with PublishModule {
3823
override def ivyDeps = Agg(ivy"com.lihaoyi::fastparse:2.3.0")
3924

4025
object test extends Tests {
41-
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.7.2")
26+
def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.7.2")
4227
def testFrameworks = Seq("utest.runner.Framework")
4328
}
4429
}

ci

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
case "$1" in
5+
6+
jitpack)
7+
exec $0 mill -j 0 __.publishM2Local
8+
;;
9+
10+
mill)
11+
exec $0 cs launch mill -- "${@:2}"
12+
;;
13+
14+
scalafmt)
15+
exec $0 cs launch scalafmt -- --mode diff --diff-branch master "${@:2}"
16+
;;
17+
18+
cs)
19+
test -x cs || {
20+
curl -o cs -qL https://git.io/coursier-cli
21+
chmod +x cs
22+
}
23+
exec ./cs "${@:2}"
24+
;;
25+
26+
test)
27+
$0 scalafmt --test
28+
$0 mill -j 0 __.test
29+
;;
30+
31+
release)
32+
git tag $(<VERSION)
33+
git push --tags
34+
;;
35+
36+
esac

jitpack.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
before_install:
2-
- |
3-
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
4-
source ~/.asdf/asdf.sh
5-
cat .tool-versions | cut -d' ' -f 1 | xargs -IX asdf plugin-add X
6-
asdf install
71
install:
8-
- |
9-
mill -i fastparse_ext.m2
10-
mkdir -p ~/.m2
11-
cp -rv out/fastparse_ext/m2/dest/ ~/.m2/repository
2+
- ./ci jitpack

0 commit comments

Comments
 (0)