Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tags for recent releases? #242

Closed
ctubbsii opened this issue Oct 23, 2017 · 11 comments
Closed

Missing tags for recent releases? #242

ctubbsii opened this issue Oct 23, 2017 · 11 comments

Comments

@ctubbsii
Copy link
Member

I was looking for the tags for recent releases 2.0.0 and 2.0.1, but they do not seem to exist.

Also, I saw that 2.1.0.RC1 was pushed to Maven Central. It also doesn't have a tag. I'd strongly advise against pushing release candidates to Maven Central. Candidates can be evaluated from the closed staging repository in Nexus. They do not need to be promoted to Maven Central to be tested, or even marked as "RC". One can simply add the staging repository to one's ~/.m2/settings.xml file to use the artifacts to test them, and if they are good, they can be promoted to Maven Central with the click of a button. In addition to potentially confusing users about whether or not a release is a "good" one, leaving it marked as "RC" and pushing it to Maven Central makes it hard to tell whether something has been promoted beyond "candidate" into a "release".

@ctubbsii
Copy link
Member Author

I think f3329e3 is the right commit to tag for 2.0.0:

git tag -s -m 'formatter-maven-plugin-2.0.0' formatter-maven-plugin-2.0.0 f3329e3536a8bc6c2d956962ee35a4264dbebfaa

I think 3ee98ec is right for 2.1.0.RC1:

git tag -s -m 'formatter-maven-plugin-2.1.0.RC1' formatter-maven-plugin-2.1.0.RC1 3ee98ec03f30f620e3b06422d64ce317520cc9a9

I'm not 100% certain about these, but I'm even less certain of which commit corresponds to 2.0.1.

Normally these get created by the maven-release-plugin, but I fear this plugin's release process is more complicated, and not well documented. If I understood it a bit better, I'd be happy to automate more tasks into the maven-release-plugin process, but I'd need an explanation of the current process first. This really should be as easy as:

  1. mvn release:prepare && mvn release:perform
  2. Verify staging repo
  3. Promote staging repo
  4. Push tag to git repo (optionally, replace with a GPG signed tag, first with -s as in the above examples)
  5. Push commits to bump version to next SNAPSHOT version
  6. Post release tasks (generate/upload site documentation and eclipse plugin repo, etc.)

Anything more complicated than that can/should be automated into the release plugin.

@hazendaz
Copy link
Member

hazendaz commented Oct 23, 2017 via email

@ctubbsii
Copy link
Member Author

@hazendaz Is there any way you can find the time to document how you're currently doing it?

@ctubbsii
Copy link
Member Author

Also, the release:perform goal is little more than a checkout of the tag, and a deploy, so if you can get things working with just a deploy, I'm sure we can fix the release process to make it work.

@hazendaz
Copy link
Member

The tags have been pushed up now. The only real way to fix the build is to either learn some other process or break the plugin away from eclipse direct needs. I can see the plugin itself getting released far more frequently now if we made that separation. I believe there is a ticket already to do that. I just haven't had the time.

What else is missing? Site is recently fully generated so while not off that deploy, it's there with latest info and finally fixed (had some internal linking issues before).

@ctubbsii
Copy link
Member Author

Thanks. I see the tags for 2.0.0 and 2.1.0.RC1, but I don't see the 2.0.1, which is the one I was least sure about.

Also, if you could provide details of the issues you run into, it would be helpful for people interested in contributing. You've alluded to some brokenness with the build due to the plugin being tied to eclipse, and some linking issues, but no details. The more details you provide about what things cause problems in releases, the more I (and others) could contribute to start addressing those things.

To start, it would be helpful simply to document the commands/steps you run to do a release.

@hazendaz
Copy link
Member

hazendaz commented Oct 24, 2017

@ctubbsii

I pushed to maven central as not every testing avenue has the option of easily reaching the outside. So that is more out of necessity if I go further with testing. I did think to call it beta but after as much testing I did this past weekend I felt comfortable with it.

I believe off a standard proper maven setup, which isn't always the case but should be that the plugin will not pick up any of the other formatters at all. That is because the code looks specifically at src/main/java and src/test/java by default. Generally those should not contain other resources. Although I've seen projects like that it's been a long time and generally those projects are just over ant at best and usually don't include anything like this project attempts to do. Although I could just disable all of them entirely unless forced on which is likely the best option. Easiest thing there although not most graceful would be to set the defaults to false meant true (ie skipFormat defaults to true) except on the java formatter.

Releasing. This is all I did.

mvn release:prepare
-- crashed, wanting .qualifier for m2e stuff to not be as such so changed those manually to RC1
-- ran the command again, it succeeded but my commit was not yet applied.
mvn release:perform
-- tried this with my commit not applied thinking it might work but no such luck.
-- [edit] There is potentially some ways to cheat if you will here by merging the commits together and messing with mavens temporary files which I'm sure includes the commit it checks out for performing the release, I can test isolating that. While still not a solution, the tycho plugin is realy the problem. It disables most of mavens plugins wanting the takari lifecyle instead.
mvn deploy -Psonatype-oss-release

Verify staging repo
Promote staging repo

For git tags today, ran this since I did them all off my machine previousy. This pulled all prior ones missing. I seeded by my origin and upstream.

git push --tags
git push upstream --tags


Push commits to bump version to next SNAPSHOT version

- This was just a sync as the release plugin already did that work.

Post release tasks (generate/upload site documentation and eclipse plugin repo, etc.)
  • Site was pushed a little over a week or two ago so nothing has really changed since. I can push again or you could if needed. We could also hook this to be automatic with every build to master on travis. Not sure if that is not the case right now but I have that setup on many other repos.

  • m2e - at the moment, manual installs can be made. I don't know how to make the download available where it indicates the files live. They are released to maven central which is what I used to verify I could install them. I'm pretty fuzzy on this area.

@hazendaz
Copy link
Member

Sorry no offical tag on 2.0.1. I noticed that wasn't present. I don't recall what I did then but suspect it was not pretty and certainly did not enjoy the benefit of forcing it through the release steps like i did this time. Surprisingly the release was actually fairly simple to pull off unlike what I expected. Had it not went so well I would not have released it.

@ctubbsii
Copy link
Member Author

Heh, no worries. Just hoping to smooth out some of the bumps in this plugin's history to help encourage others to contribute and help with maintaining, so it's not all on you. 😄

@ctubbsii
Copy link
Member Author

Found a commit that was basically 2.0.1, so I made a tag and pushed it.

@hazendaz
Copy link
Member

hazendaz commented Oct 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants