reibitto / sbt-welcome

An SBT plugin for displaying a welcome message and commonly used tasks.
Apache License 2.0
79 stars 4 forks source link

Disable in CI #6

Closed davesmith00047 closed 1 year ago

davesmith00047 commented 1 year ago

Is there a way to disable the welcome message in (for example) a CI run?

reibitto commented 1 year ago

There isn't currently but that would definitely be a good addition. I'm on winter break right now but I can do this when I get back.

As for the feature, I guess I could check for the flag both as an env var and property (with one taking priority)? And by default I could try to detect if it's in a CI environment automatically. I think I recall sbt does something similar somewhere? I'm not sure what the implementation looks like though.

davesmith00000 commented 1 year ago

No huge rush - I hope you are enjoying your holidays! 😄

My gut feeling is, as you said, that if I was going to use this in CI I'd either want to set an environment variable, or my build could drop a welcome.sbt file into the root before running sbt with a ThisBuild / welcomeEnabled := false in it or something. I'm personally less concerned about CI environment auto-detection but perhaps other people would fine that useful.