我有一个名为prePublishCheck
的任务,它确保在将JAR发布到Artifactory之前Git工作树不脏,该Artifactory应该在AutoPlugin中的publish
任务之前运行。
如何让SBT在publish
之前运行此任务?
以下代码至少对sbt 1.1.5
无效:
// Has no effect on `publish`
prePublishCheck := { throw new Exception("test") },
publish := (prePublishCheck before publish).value
// Has no effect on `publish`
prePublishCheck := { throw new Exception("test") },
prePublishCheck := (prePublishCheck before publish).value
这些类似的答案已经过时了: