php - How do you avoid forgetting to increase version number for your project? -
I always forget to change the version number for the bugfix version, when I released 1.0.9, maybe source code Version number is still 1.0.0
So far, this is not a big issue as SVN was logged in every release, I can get a specific release from my SVN at any time.
But I know it is not good, and in the near future it can cause problems while upgrading an older version. I have collected the version number as a parameter in my source code, I want to have a better way of controlling this number, especially for php web projects (I know that in some other languages auto version generation But do not think in php?).
How do you cover this problem in your project? Any best practice?
Use continuous integration software, and use a build script that accepts the version number One parameter is your build script that can only be called a small device that only does: Open the file (versioninfo.php), search for this string (some regex content), and replace it with the given parameter.
Some additional hints to make it even easier: Branches of every edition that will be released shortly, we have just produced 5.0 (but it is now Is also made for the purpose of hotfixing), 5.1 is equal and it is examined at this point, and 5.2 in the trunk.
Every time you need to release a hotfix, update the version number in TeamCity, and call the build script (which should also be done in TeamCity).
Fe we have the following projects at this point:
- 5.0.5 Release (which takes /v=5.0.5)
- Release 5.1 (which takes /v=5.1)
- Trunk (which takes /v=5.2)
This version is used to prefix your version of SQL scripts with version number Doing, and creating an automated database is a script, which makes a bigger per-edition transaction script (eg: 'DPL_Updates_for_5.1.sql').
When we are bringing a version for production, we take the artwork from the branch from TeamCity, the database-specific script that is specific is automatically added to the zip file, and We give files (and release notes, etc.) to our application management department.
Comments
Post a Comment