in reply to Re: Perl/SVN/versioning - ideas?
in thread Perl/SVN/versioning - ideas?

I've looked into that, but the problem is that that revision only applies to the current file - I want the revision for the latest submitted set of files (Base revision). This since the application consists of several files.

Replies are listed 'Best First'.
Re^3: Perl/SVN/versioning - ideas?
by moritz (Cardinal) on Aug 02, 2011 at 17:32 UTC
    Then install a post-commit hook that writes the revision into a special file, and read that for determining the revision.

    But be careful when you do releases, it might be better to hardcode the version in the .pl and .pm files in released versions of your app.

      Then install a post-commit hook that writes the revision into a special file, and read that for determining the revision.

      If the file looks like:

      package Project::Version; use strict; use warnings; use Exporter qw( import ); our @EXPORT = qw( $VERSION ); our $VERSION = ...; 1;

      Then use Project::Version; will import $VERSION into the caller.