Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practices for version information?

I am currently working on automating/improving the release process for packaging my shop's entire product. Currently the product is a combination of:

  • Java server-side codebase
  • XML configuration and application files
  • Shell and batch scripts for administrators
  • Statically served HTML pages
  • and some other stuff, but that's most of it

All or most of which have various versioning information contained in them, used for varying purposes. Part of the release packaging process involves doing a lot of finding, grep'ing and sed'ing (in scripts) to update the information. This glue that packages the product seems to have been cobbled together in an organic, just-in-time manner, and is pretty horrible to maintain. For example, some Java methods create Date objects for the time of release, the arguments for which are updated by a textual replacement, without compiler validation... just, urgh.

I'm trying avoid giving examples of actual software used (i.e. CVS, SVN, ant, etc.) because I'd like to avoid the "use xyz's feature to do this" and concentrate more on general practices. I'd like to blame shoddy design for the problem, but if I had to start again, still using varying technologies, I'd be unsure how best to go about handling this, beyond laying down conventions.

My questions is, are there any best practices or hints and tips for maintaining and updating versioning information across different technologies, filetypes, platforms and version control systems?

like image 360
Grundlefleck Avatar asked Oct 22 '08 15:10

Grundlefleck


People also ask

How do you maintain version control of documents?

Keep version control simple and systematic. The important thing is to agree a standard within your team which everyone understands and applies. Each time a revision is made, save the document as a new version, with a new unique version number – do not overwrite the previous version.


1 Answers

Create a properties file that contains the version number and have all of the different components reference the properties file

  • Java files can reference the properties through
  • XML can use includes?
  • HTML can use a JavaScript to write the version number from the properties in the HTML
  • Shell scripts can read in the file
like image 130
Craig Angus Avatar answered Sep 24 '22 00:09

Craig Angus