Changeset [cc548335affbce34b0420399c23548e7ddf75788] by Thell Fowler

November 3rd, 2009 @ 04:09 PM

project files: introduce version info generator

  • Modifies all VC 8 & 9 build configurations in the notepadplus project files to use a pre-build event to generate entries for resource VERSIONINFO and include gen-versioninfo.h which is built from the GIT-VS-VERSION-GEN.bat script. The gen-versioninfo.h is included in the project file and added to .gitignore.

  • The GIT-VS-VERSION-GEN.bat uses three possible sources:

    • A packaged release VERSION file.
    • Default value within the script itself
    • git-describe

The version information generated creates a file version string with the format: Major.Minor.Stage.Revision with stage values of:

0=alpha, 1=beta, 2=release candidate, 3=release

The revision value is the number of commits since the '0' tag of the current stage. So, if a topic branch is 3 commits ahead of vX.Y.Z-rc1 which is 30 commits ahead of xX.Y.Z-rc0 then the Revision value would be 33.

If a tag's 'Z' value matches the number of commits from the '0' tag of the current stage and HEAD is clean then VS_FF_PATCHED will be flagged but VS_FF_PRIVATE will not be. This allows a maint patch to be different than a commit that is a similar number of commits away from the patched build to be identified. For instance if v1.0.0 is tagged and someone commits a single commit on top of that and builds the digital values would be 1,0,3,1 and if a maint release of v1.0.1 is build it will also have a digital version of 1,0,3,1.

Builds created while working with a dirty directory tree will have the version string amended with '-dirty'.

  • VS_FF_PRIVATE, VS_FF_PATCHED, VS_FF_PRERELEASE are set accordingly when git is available, as well as Comment and Private Build strings.

  • When git is available multiple builds of the same commit exit early based on the value stored in an untracked tmp file. This feature can be skipped using the --force argument.

[#12 state:needs_ack responsible:npp-community tagged:versioning]

Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/almostautomated/npp-community/commit/cc548335affb...

Committed by Thell Fowler

  • A PowerEditor/src/.gitignore
  • A scripts/GIT-VS-VERSION-GEN.bat
  • M PowerEditor/src/Notepad_plus.rc
  • M PowerEditor/visual.net/notepadPlus.8.vcproj
  • M PowerEditor/visual.net/notepadPlus.9.vcproj
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Notepad++ Community Release

Shared Ticket Bins