3

I am currently working with a coding project using the bzr (bazaar) source code management software. I would like to include the version number in the file code of my project

So that I could call the variable "VERSION" and echo out my current working version. Within the code be able to do this:

var VERSION = ###;

Where ### is the current version number. Is this possible? or do I have to inspect the bzr info on a file and increment my version manually prior to committing new code?

Liath
  • 9,913
  • 9
  • 51
  • 81
taggedzi
  • 129
  • 4

2 Answers2

3

The only solution I know is the Keyword plugin for Bazaar: http://doc.bazaar.canonical.com/plugins/en/keywords-plugin.html

(This points to https://launchpad.net/bzr-keywords but the first link has more explanation).

Steps:

  1. Get the plugin

    bzr branch lp:bzr-keywords

  2. Install plugin (basically copy it in bazaar plugins install folder)

  3. Get the help

    bzr help keywords

Once installed, commit your code with the keywords inside, it will be replaced.

TridenT
  • 4,879
  • 1
  • 32
  • 56
0

Another option is to invoke the 'bzr version-info' command, which can output the version number in various convenient ways.

jelmer
  • 2,405
  • 14
  • 27