Skip to content

Commit

Permalink
Update welcome tasks and command alias (zio#2572)
Browse files Browse the repository at this point in the history
* Update welcome tasks and command alias

* Update contributor guide, command alias in favor of prepare and builderhelper

* Update contributor guide, command alias in favor of prepare and builderhelper
  • Loading branch information
saraiva132 authored and jdegoes committed Jan 4, 2020
1 parent 417ffbc commit 1b54394
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ inThisBuild(

ThisBuild / publishTo := sonatypePublishToBundle.value

addCommandAlias("build", "prepare; testJVM")
addCommandAlias("prepare", "fix; fmt")
addCommandAlias("fix", "all compile:scalafix test:scalafix")
addCommandAlias(
"fixCheck",
Expand Down
14 changes: 11 additions & 3 deletions docs/about/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,20 @@ At this point, you should re-run all tests to make sure everything is passing:
sbt test
```

If all the tests are passing, then you can format your code:
If all the tests are passing, then you can prepare your code to be shipped:

```bash
# If you are already in a SBT session you can type only 'fmt'
# If you are already in a SBT session you can type only 'prepare'

sbt fmt
sbt prepare
```

For simplicity, there is a command that does everything. Prepares code, compiles it and runs tests:

```bash
# If you are already in a SBT session you can type only 'build'

sbt build
```

If your changes altered an API, then you may need to rebuild the microsite to make sure none of the (compiled) documentation breaks:
Expand Down
3 changes: 3 additions & 0 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ object BuildHelper {
|${header(s"/____|___\\___/ ${version.value}")}
|
|Useful sbt tasks:
|${item("build")} - Prepares sources, compiles and runs tests.
|${item("prepare")} - Prepares sources by applying both scalafix and scalafmt
|${item("fix")} - Fixes sources files using scalafix
|${item("fmt")} - Formats source files using scalafmt
|${item("~compileJVM")} - Compiles all JVM modules (file-watch enabled)
|${item("testJVM")} - Runs all JVM tests
Expand Down

0 comments on commit 1b54394

Please sign in to comment.