vivin / gradle-semantic-build-versioning

Gradle plugin to generate version-numbers and tags using semantic versioning
MIT License
86 stars 32 forks source link

tagAndPush needs the same mustRunAfter as tag and both cannot be used at the same time #23

Closed vivin closed 8 years ago

vivin commented 8 years ago

Currently tagAndPush doesn't have the same mustRunAfter definitions as tag and both tasks can be used at the same time.

vivin commented 8 years ago

Fixed.

Vampire commented 8 years ago

What are the mustRunAfters for anyway? Because mustRunAfter does not make much sense if the dependency tasks do not do anything actually.

vivin commented 8 years ago

Duh. This is what happens when I am in autopilot mode. :/

vivin commented 8 years ago

Ooh, I just remembered why. I wanted tagging to be done only after a release. I should probably make it a dependency because you don't want it to tag unless release was successful.

Vampire commented 8 years ago

But even then I don't understand why the marker tasks have to run before the tag task. If you would say "if release task exists, tag has to run after it" I'd understand. But that is not what is set up there. Besides that, I think it is in the responsibility of the build script author to make this setting as only the build script author knows which task is the ultimate release task after which the tagging should be done. There he can even do a finalizedBy relationship, so that if he calls "release" or "publishPlugin" or whatever, "tag" or "tagAndPush" however he likes is called automatically, even if not mentioned on the commandline.

vivin commented 8 years ago

I think that was my original intent (if the release task exists, tag has to run after it). It isn't set up that way currently - I hadn't really given a thorough look to that section of code (other than to add this change real quick).

Yes, it definitely is the responsibility of the build author to set up the dependencies. But as I mentioned earlier, I had no idea what release could or would do, so I thought I would try and set up that dependency so that a tag isn't created even when release fails.