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

Make SCALAJS_VERSION more robust #217

Merged
merged 1 commit into from
May 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
- TRAVIS_NODE_VERSION="12.16.1" JOB_NAME="test"
matrix:
- SCALAJS_VERSION="0.6.32"
- SCALAJS_VERSION="1.0.1"
- SCALAJS_VERSION=""

script:
- sbt ++$TRAVIS_SCALA_VERSION test
Expand Down
2 changes: 1 addition & 1 deletion project/MySettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object MySettings {

lazy val commonScalaJsSettings = Seq(
scalacOptions ++= Seq("-P:scalajs:sjsDefinedByDefault").filter { _ =>
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.1").startsWith("0.6.")
Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("1.0.1").startsWith("0.6.")
},
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.CommonJSModule)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.1")
Option(System.getenv("SCALAJS_VERSION")).filter(_.nonEmpty).getOrElse("1.0.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
Expand Down
2 changes: 1 addition & 1 deletion script/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cat ./version.sbt

export SCALAJS_VERSION=0.6.32
sbt clean +publishSigned sonatypeBundleUpload sonatypeReleaseAll
export SCALAJS_VERSION=1.0.1
unset SCALAJS_VERSION
sbt clean +publishSigned sonatypeBundleUpload sonatypeReleaseAll