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

Find a way to avoid unnecessarily including modified version numbers in commits #147

Open
raamdev opened this issue Dec 9, 2016 · 2 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Dec 9, 2016

@raamdev writes...

@jaswsinc I noticed while reviewing your PRs that you seem to be unnecessarily committing lots of version number changes. Is there a reason for that? Those changes should only be committed when actually do a release. e.g., https://github.com/websharks/comet-cache-pro/pull/296/files#diff-9c67df51b0f1878fbf046f9c24645a45

@jaswsinc writes...

It's mostly from me being lazy and running phing full-build-all -D composer-lock-delete=true instead of just phing full-build or composer update. I tend to do that from time to time so I can make sure composer.lock is updated with the latest dependencies. I also do that to bump the version for testing the VS upgrades periodically; i.e., while I'm working on other things, just in case it helps me spot something in the upgrade handlers that is impacted by other changes.

So the short answer is that I'll try not to do this as much, but I'm not sure if that will be a good thing or a bad thing yet. Hmm, is it really a problem for the version numbers to get bumped in the dev branch as they are merged in? Aside from it making the diffs a little more difficult (just slightly), my feeling is that bumping those versions is something that helps me.

Keep in mind that I don't build distros, then test. That slows me down. I keep the active codebase in WordPress while I'm making changes; i.e., I don't install a ZIP file.

@raamdev writes...

My feeling is that any changed version number that gets committed adds to all sorts of confusion, not only when I'm reviewing the source code ("hey! what's this change here?! Oh... it's not really relevant to anything.... Oh! what's this? Oh, same thing, not relevant...") but also because in the future when going back and researching a bug or trying to figure out where things changed, it's confusing to see version numbers that never really existed (i.e., were never really released).

I can see the need to do whatever is necessary to help you with development, but then maybe those phing routines shouldn't change the version number, at least not without a flag (that I only run when doing a release, or that you use when testing a version upgrade and then intentionally don't commit).

The way I look at it: There's a right way to do things and a wrong way. Then there's a messy way. :-) We should always be striving to do things "the right way".

@jaswsinc writes...

I can agree with those thoughts also. I'll keep this mind when I'm working in Phing soon too. I have a few issues piling up over there and plans to dig that project back out again soon and see if I can knock out a few open issues. I like the version changing on my side, but I also agree that it makes the diffs messy and it's not really the proper way to do it.

@jaswrks
Copy link
Contributor

jaswrks commented Dec 21, 2016

Noting that this is already built-in via phing build-all or phing build instead of phing full-build-all or phing full-build. I just need to start using those instead. Bad habit.

@jaswrks jaswrks closed this as completed Dec 21, 2016
@jaswrks jaswrks reopened this Jan 27, 2017
@jaswrks
Copy link
Contributor

jaswrks commented Jan 27, 2017

Reopening this as I just discovered one of the reasons I was forced to do this in the past. Whenever I want to release a new bleeding edge, the build routines need to run (in full) to update the software and prepare it for a new bleeding edge.

So the ability to do a full build, update versions, etc... prior to actually doing a release, is still desirable. However, in the future it would be nice to make this possible without needing to commit those version changes.

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

No branches or pull requests

2 participants