I have a task called prePublishCheck
which ensures that the Git working tree isn't dirty before publishing a JAR to Artifactory, which is supposed to run before the publish
task in an AutoPlugin.
How can I get SBT to run this task before publish
?
The following code has no effect with at least 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
These similar answers are obsolete: