/NEWS.atom
/NEWS
*.log
+/lib/PublicInbox.pm
t/www_static.t
t/x-unknown-alpine.eml
t/xcpdb-reshard.t
+version-gen.perl
xt/cmp-msgstr.t
xt/cmp-msgview.t
xt/create-many-inboxes.t
use ExtUtils::MakeMaker;
open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n";
chomp(my @manifest = (<$m>));
+push @manifest, 'lib/PublicInbox.pm'; # generated
my @EXE_FILES = grep(m!^script/!, @manifest);
my $v = {};
my $t = {};
NAME => 'PublicInbox', # n.b. camel-case is not our choice
# XXX drop "PENDING" in .pod before updating this!
- VERSION => '1.6.1',
+ VERSION => '1.7.0.PENDING',
AUTHOR => 'Eric Wong <e@80x24.org>',
ABSTRACT => 'public-inbox server infrastructure',
# prefix + bindir matches git.git Makefile:
prefix = \$(HOME)
bindir = \$(prefix)/bin
-symlink-install :
+symlink-install : lib/PublicInbox.pm
mkdir -p \$(bindir)
lei=\$\$(realpath lei.sh) && cd \$(bindir) && \\
for x in \$(EXE_FILES); do \\
ln -sf "\$\$lei" \$\$(basename "\$\$x"); \\
done
+pure_all :: lib/PublicInbox.pm
+lib/PublicInbox.pm : FORCE
+ VERSION=\$(VERSION) \$(PERL) -w ./version-gen.perl
+
update-copyrights :
\@case '\$(GNULIB_PATH)' in '') echo >&2 GNULIB_PATH unset; false;; esac
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \\
# Copyright (C) 2014-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
-use warnings;
-use Test::More;
-use PublicInbox::Config;
+use v5.10.1;
use PublicInbox::TestCommon;
use PublicInbox::Import;
+use_ok 'PublicInbox';
+ok(defined(eval('$PublicInbox::VERSION')), 'VERSION defined');
+use_ok 'PublicInbox::Config';
my ($tmpdir, $for_destroy) = tmpdir();
{
--- /dev/null
+#!perl -w
+use v5.10.1;
+my $v = $ENV{VERSION} // die 'VERSION unset';
+my $f = './lib/PublicInbox.pm';
+if (-d ($ENV{GIT_DIR} // '.git') || -f '.git') {
+ chomp(my $gv = `git describe --match "v[0-9]*" HEAD`);
+ if ($? == 0) {
+ substr($gv, 0, 1, ''); # remove "v"
+ system(qw(git update-index -q --refresh));
+ if (my @n = `git diff-index --name-only HEAD --`) {
+ $gv .= '-dirty';
+ }
+ $v = $gv;
+ }
+}
+$v =~ tr/-/./;
+if (-f $f && do $f && (eval('$PublicInbox::VERSION') // 'undef') eq $v) {
+ exit
+}
+my $tmp = "$f.tmp.$$";
+open my $fh, '>', $tmp or die "open($tmp): $!";
+print $fh <<EOM or die "print($tmp): $!";
+# this file is generated by $0
+package PublicInbox;
+our \$VERSION = '$v';
+1;
+EOM
+close $fh or die "close($tmp): $!";
+rename($tmp, $f) or die "rename($tmp, $f): $!";