diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..21b4fba --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,21 @@ +# Releasing the CLI + +## Version commit + +For releases, make sure that the default value for `scalaJSVersion` in the +build matches the `version` of `scalajs-cli`. + +## Publish the `scalajs-cli` artifact to Maven Central + +This is a normal cross-compiled publish: + + > +publishSigned + +## Build and upload the standalone distribution + +For each major version of Scala, identify the latest corresponding full version +and run: + + $ ./scripts/assemble-cli.sh + +Then upload the produced archives (in `pack/`) to the website, using `scp`. diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..150ad95 --- /dev/null +++ b/TESTING.md @@ -0,0 +1,36 @@ +# Testing the standalone distribution + +TODO: We should automate this process + +For each major Scala version on a *NIX distro and a Windows distro: + +1. Download packaged Scala from scala-lang.org +2. Build a CLI distribution (see [the release process](./RELEASING.md)) +3. Unpack Scala and Scala.js distro +4. Add `bin/` directories of both distributions to path (`export PATH=$PATH:/bin:/bin`) +5. Create a temporary directory and do: + + mkdir bin + echo ' + object Foo { + def main(args: Array[String]): Unit = { + println(s"asdf ${1 + 1}") + new A + } + + class A + } + ' > foo.scala + scalajsc -d bin foo.scala + + scalajsp bin/Foo$.sjsir + # Verify output + scalajsp bin/Foo\$A.sjsir + # Verify output + + scalajsld -o test.js -mm Foo.main bin + # Verify output + + node test.js # Or your favorite thing to run JS + + # Expect "asdf 2"