如果您只關心副作用,並且真的只是想模擬人類依序輸入一個又一個的指令,那麼自訂指令可能正是您所需要的。這在發布程序中非常方便。
這是 sbt 本身建置腳本的內容
commands += Command.command("releaseNightly") { state => "stampVersion" :: "clean" :: "compile" :: "publish" :: "bintrayRelease" :: state }