问题
In a .travis.yml file using sbt, I see this
script:
- sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS
In sbt, I can run test
, and I can run fastOptJS
. What does the single colon between them do?
In travis, can one run a sequence of commands? ie. what does it mean for test:fastOptJS
to be followed by test:fullOptJS
?
回答1:
In sbt, I can run
test
, and I can runfastOptJS
. What does the single colon between them do?
test:fastOptJS
means fastOptJS
in test
scope. The confusion comes from the fact that the test scope and the test task are both test
in sbt's shell.
This, btw, is fixed in sbt 1.1's new "unified slash syntax" where the test scope now Test
, so test:fastOptJS
is now Test / fastOptJS
.
In travis, can one run a sequence of commands? ie. what does it mean for
test:fastOptJS
to be followed by test:fullOptJS?
Yes you can run a sequence of commands.
sbt ++$TRAVIS_SCALA_VERSION test:fastOptJS test:fullOptJS
means run ++$TRAVIS_SCALA_VERSION
(which changes scalaVersion
), then test:fastOptJS
then test:fullOptJS
.
来源:https://stackoverflow.com/questions/48322013/what-does-a-single-colon-mean-in-sbt-between-two-commands