Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #96 from exoego/release
Browse files Browse the repository at this point in the history
Cross-publishing for Scala.js 1.0/0.6
  • Loading branch information
exoego committed Feb 23, 2020
2 parents 7c6d265 + 3140292 commit 820a8dd
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI
on: [pull_request]
jobs:
format:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v1
- uses: olafurpg/setup-scala@v5
- name: Check Scalafmt/Scaladoc
run: sbt ++2.13.1 scalafmtSbtCheck scalafmtCheckAll
1 change: 1 addition & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pull_request_rules:
conditions:
- "author=scala-steward"
- "status-success=Travis CI - Pull Request"
- "status-success=format"
actions:
merge:
method: merge
Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ scala:
- 2.12.10
- 2.13.1

env:
matrix:
- SCALAJS_VERSION="0.6.32"
- SCALAJS_VERSION="1.0.0"

script:
- sbt scalafmtCheck test:scalafmtCheck scalafmtSbtCheck fullOptJS
- sbt fullOptJS

before_cache:
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ It can be found in [aws-sdk-scalajs-facade](https://github.com/exoego/aws-sdk-sc

## Support matrix

| | ScalaJS 0.6.28+ | ScalaJS 1.x |
| ---------- | :------------------| :------------: |
| Scala 2.13 | :heavy_check_mark: | :construction: |
| Scala 2.12 | :heavy_check_mark: | :construction: |
| Scala 2.11 | N/A | N/A |
| Scala 2.10 | N/A | N/A |
| | ScalaJS 0.6.28+ | ScalaJS 1.x |
| ---------- | :------------------| :----------------: |
| Scala 2.13 | :heavy_check_mark: | :heavy_check_mark: |
| Scala 2.12 | :heavy_check_mark: | :heavy_check_mark: |
| Scala 2.11 | N/A | N/A |
| Scala 2.10 | N/A | N/A |

- :heavy_check_mark: Supported
- :construction: Not supported but planned
Expand All @@ -27,7 +27,7 @@ Add dependency in `build.sbt`.

```sbt
// For Node.js v12
libraryDependencies += "net.exoego" %%% "aws-lambda-scalajs-facade" % "0.5.0"
libraryDependencies += "net.exoego" %%% "aws-lambda-scalajs-facade" % "0.6.0"
```

Import and code.
Expand Down
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ enablePlugins(ScalaJSPlugin)

name := "aws-lambda-scalajs-facade"
organization := "net.exoego"
scalacOptions += "-P:scalajs:sjsDefinedByDefault"
scalacOptions ++= Seq("-P:scalajs:sjsDefinedByDefault").filter { _ =>
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.0").startsWith("0.6.")
}
// false positive on js.native
scalacOptions --= Seq(
"-Wdead-code",
Expand Down
7 changes: 6 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION"))
.filter(_.nonEmpty)
.getOrElse("0.6.32")

addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.1")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.10")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8.1")
Expand Down
1 change: 0 additions & 1 deletion publishing.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ releaseProcess := Seq[ReleaseStep](
setNextVersion,
commitNextVersion
)
skip in packageJSDependencies := false
8 changes: 8 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#! /bin/bash

cat ./version.sbt

export SCALAJS_VERSION=0.6.32
sbt clean +publishSigned sonatypeBundleUpload sonatypeReleaseAll
export SCALAJS_VERSION=1.0.0
sbt clean +publishSigned sonatypeBundleUpload sonatypeReleaseAll
6 changes: 6 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

export SCALAJS_VERSION="0.6.32"
sbt show scalaVersion
export SCALAJS_VERSION="1.0.0-RC2"
sbt show scalaVersion
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.5.1-SNAPSHOT"
version in ThisBuild := "0.6.0"

0 comments on commit 820a8dd

Please sign in to comment.