Skip to content

Commit

Permalink
cross-platforming was a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Aug 26, 2023
1 parent a501075 commit a1e0e5b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 60 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
distribution: temurin
java-version: 19
- name: build
run: ./mill sclin.jvm.assembly
run: ./mill sclin.assembly
- name: generate docs
run: ./mill sclin.jvm.cmdoc
run: ./mill sclin.cmdoc
- name: run examples
run: node docr.js sclin-docs/commands.md
- name: commit + push
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
SONATYPE_GPG_PASSWORD: ${{ secrets.SONATYPE_GPG_PASSWORD }}
run: |
./mill mill.scalalib.PublishModule/publishAll \
sclin._.publishArtifacts \
__.publishArtifacts \
$SONATYPE_USERNAME:$SONATYPE_PASSWORD \
--gpgArgs --passphrase=$SONATYPE_GPG_PASSWORD,--no-tty,--pinentry-mode,loopback,--batch,--yes,-a,-b \
--sonatypeUri https://s01.oss.sonatype.org/service/local \
Expand All @@ -47,7 +47,7 @@ jobs:
java-version: 19
- uses: coursier/cache-action@v6
- name: build
run: ./mill sclin.jvm.assembly
run: ./mill sclin.assembly
- name: gh release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Download the [latest executable JAR from releases](https://github.com/molarmanfu

### Building from Scratch

Clone this repo, `cd` into it, and run `./mill sclin.jvm.assembly` (use `mill.bat` instead of `mill` if on Windows). The built JAR can be found at `out/sclin/jvm/assembly.dest/out.jar`.
Clone this repo, `cd` into it, and run `./mill sclin.assembly` (use `mill.bat` instead of `mill` if on Windows). The built JAR can be found at `out/sclin/jvm/assembly.dest/out.jar`.

## Licensing

Expand Down
83 changes: 33 additions & 50 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -5,65 +5,48 @@ import com.github.lolgab.mill.crossplatform._
import de.tobiasroeser.mill.vcs.version.VcsVersion
import mill._
import scala.util.chaining._
// import scalajslib._
import scalalib._
import scalalib.publish._

object sclin extends CrossPlatform {

trait Shared extends CrossPlatformScalaModule with PublishModule {

def scalaVersion = "3.3.0"
override def publishVersion: T[String] = VcsVersion.vcsState().format()
def pomSettings = PomSettings(
description = "Scala implementation of lin",
organization = "io.github.molarmanful",
url = "https://github.com/molarmanful/sclin",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("molarmanful", "sclin"),
developers = Seq(
Developer("molarmanful", "Ben Pang", "https://github.com/molarmanful")
)
)
def scalacOptions = Seq("-deprecation", "-feature")
def ivyDeps = Agg(
ivy"org.typelevel::spire::0.18.0",
ivy"com.lihaoyi::mainargs::0.5.1",
ivy"com.lihaoyi::fansi::0.4.0",
ivy"com.lihaoyi::upickle::3.1.2",
ivy"io.monix::monix::3.4.1"
object sclin extends ScalaModule with PublishModule {

def scalaVersion = "3.3.0"
override def publishVersion: T[String] = VcsVersion.vcsState().format()
def pomSettings = PomSettings(
description = "Scala implementation of lin",
organization = "io.github.molarmanful",
url = "https://github.com/molarmanful/sclin",
licenses = Seq(License.MIT),
versionControl = VersionControl.github("molarmanful", "sclin"),
developers = Seq(
Developer("molarmanful", "Ben Pang", "https://github.com/molarmanful")
)
)
def scalacOptions = Seq("-deprecation", "-feature")
def ivyDeps = Agg(
ivy"org.typelevel::spire:0.18.0",
ivy"com.lihaoyi::mainargs:0.5.1",
ivy"com.lihaoyi::fansi:0.4.0",
ivy"com.lihaoyi::upickle:3.1.2",
ivy"io.monix::monix:3.4.1",
ivy"com.lihaoyi::os-lib:0.9.1"
)

object test extends ScalaTests with TestModule.Munit {
object test extends ScalaTests with TestModule.Munit {

def ivyDeps = Agg(ivy"org.scalameta::munit::1.0.0-M8")

}
def ivyDeps = Agg(ivy"org.scalameta::munit::1.0.0-M8")

}
object jvm extends Shared {

def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::os-lib:0.9.1"
)

def cmdoc() = T.command {
os.read
.lines(millSourcePath / "src" / "Lib.scala")
.dropWhile(_.trim != "// CMDOC START")
.takeWhile(_.trim != "// CMDOC END")
.tail
.pipe(docp.DocParser.parse)
.pipe(_.md)
.pipe(os.write.over(os.pwd / "sclin-docs" / "commands.md", _))
}

def cmdoc() = T.command {
os.read
.lines(millSourcePath / "src" / "Lib.scala")
.dropWhile(_.trim != "// CMDOC START")
.takeWhile(_.trim != "// CMDOC END")
.tail
.pipe(docp.DocParser.parse)
.pipe(_.md)
.pipe(os.write.over(os.pwd / "sclin-docs" / "commands.md", _))
}
// object js extends Shared with ScalaJSModule {

// def scalaJSVersion = "1.13.2"
// def moduleKind = scalajslib.api.ModuleKind.ESModule

// }

}
5 changes: 0 additions & 5 deletions sclin/js/src/Main_JS.scala

This file was deleted.

File renamed without changes.

0 comments on commit a1e0e5b

Please sign in to comment.