sbt-release-early icon indicating copy to clipboard operation
sbt-release-early copied to clipboard

Skip publish for whitelisted files

Open jvican opened this issue 7 years ago • 11 comments

There are files in a repository, like docs, that should not affect the compilation of the project and therefore publish a new artifact (the artifact will be the same as the one previously released).

I would like sbt-release-early to allow me to define the whitelisted files in my build in the following way:

releaseEarlyWhitelistedFiles in Global := List("README.md", "CONTRIBUTING.md", ...)

When I commit this setting implementation, the releaseEarly would not trigger the publish task if only those files have been modified. If there's a change in any other file, it will publish an artifact as expected.

The implementation of this feature cannot assume that the previous commit has been released, and therefore we need to get the modified files since the last published commit (contrary to the last commit, i.e. HEAD~1).

jvican avatar Jun 21 '17 23:06 jvican

Could we automatically derive the whitelist as files that are not in any sources in the sbt build?

olafurpg avatar Jun 22 '17 08:06 olafurpg

Yes, we could, good point. We should also detect changes in:

  • Sbt files.
  • Managed sources.
  • Managed libraries (things in /lib).
  • Resources.

I think I'm not missing anything, but haven't devoted it too much thinking.

jvican avatar Jun 22 '17 08:06 jvican

By the way, for some of the files, you can already do this with Drone by adding [CI SKIP] or [SKIP CI] to the first line of the commit message. The case that is not supported is when you want to modify a file that changes the behaviour of tests but has no relevance to the final published binaries.

jvican avatar Sep 03 '17 17:09 jvican

I'm adding this for an spree. Hope this will get solved in Lambda World at the end of October.

jvican avatar Oct 06 '17 16:10 jvican

I'm adding this for an spree

How about adding Hacktoberfest label? 🍻 😉

laughedelic avatar Oct 06 '17 16:10 laughedelic

We call them sprees because that's the official name https://github.com/scalacenter/sprees. But we can add another label for the awesome Hacktoberfest! :smile:

jvican avatar Oct 06 '17 16:10 jvican

Cool! I didn't know about scalacenter/sprees (I thought it's just another word for "hackaton").

👕 More free t-shirts to the god of t-shirts! 😆

laughedelic avatar Oct 06 '17 16:10 laughedelic

Yeah, and hope we see each other in a spree soon so that I can you your well-deseved t-shirt! We usually organize them in popular Scala conferences. Next up is Lambda World, in Cadiz, at the end of the month.

jvican avatar Oct 06 '17 16:10 jvican

Haha 😅 that's a fortunate coincidence! I'm coming to Lambda World (I live in Granada, so it's relatively close).

laughedelic avatar Oct 06 '17 17:10 laughedelic

Well, that's awesome :smile:! We'll go for a beer. You can also join us at the spree, we're looking for maintainers that would propose tickets in their projects. Your sbt plugins would be a great fit for the spree if you have low-hanging fruits like this one :tada:.

jvican avatar Oct 06 '17 21:10 jvican

Cool! 🍻

You can also join us at the spree, we're looking for maintainers that would propose tickets in their projects.

Sounds great 👍 I will think about it and add something to scalacenter/sprees.

laughedelic avatar Oct 06 '17 22:10 laughedelic