I'm working on a project that has a version checker to see if it's up to date. The way I do it is by including the version in the source code of the main class and in my Github repository, I have a file that just includes the latest version.
Whenever I push to the repository, I have to increment both the version file and field in the source. Unfortunately, I'm incredibly forgetful and always forget to increment at least one of them.
A little information, I'm working in Eclipse on a Java applet. I'm not entirely sure what you'd call it but the version file is adjacent to the src/ directory (I guess the project root). I should also note that I'm a total noob with git and have absolutely no idea what I'm doing so examples would be appreciated.
Is there anyway I can easily manage the version that will guarantee that both change?