Skip to content

Commit b60d376

Browse files
committed
Add DBIXS_VERSION & DBIXS_RELEASE to dbixs_rev.h
1 parent d0b3ef2 commit b60d376

File tree

4 files changed

+36
-5
lines changed

4 files changed

+36
-5
lines changed

ChangeLog

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
1.648 - 2025-02-14, H.Merijn Brand
1+
1.648 - 2025-03-11, H.Merijn Brand
22
* Correct sprintf usage for trace_msg (issue#132)
3+
* Add DBIXS_VERSION & DBIXS_RELEASE to dbixs_rev.h
34

45
1.647 - 2025-01-20, H.Merijn Brand
56
* Spellcheck

dbixs_rev.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
/* Fri Jan 17 15:09:59 2025 */
2-
#define DBIXS_REVISION 1698
1+
/* Tue Mar 11 10:51:15 2025 */
2+
/* M dbixs_rev.pl */
3+
/* M lib/DBI/Changes.pm */
4+
#define DBIXS_VERSION 1
5+
#define DBIXS_RELEASE 648
6+
#define DBIXS_REVISION 1703

dbixs_rev.pl

+14-2
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,29 @@ sub skip_update {
1414

1515
-d ".git" or skip_update ("No git env");
1616

17+
my ($dbiv, $dbir);
18+
open my $fh, "<", "DBI.pm" or die "DBI.pm: $!\n";
19+
while (<$fh>) {
20+
m/\b VERSION \s*=\s* (["']) ([0-9]+) \. ([0-9]+) \1/x or next;
21+
($dbiv, $dbir) = ($2, $3);
22+
close $fh;
23+
last;
24+
}
25+
$dbiv or die "Cannot fetch DBI version from DBI.pm\n";
26+
1727
my @n = eval { qx{git log --pretty=oneline} };
1828
@n or skip_update ("Git log was empty");
1929

20-
open my $fh, ">$dbixs_rev_file" or die "Can't open $dbixs_rev_file: $!\n";
30+
open $fh, ">$dbixs_rev_file" or die "Can't open $dbixs_rev_file: $!\n";
2131
print $fh "/* ", scalar localtime, " */\n";
2232

2333
chomp (my @st = qx{git status -s --show-stash});
2434
print $fh "/* $_ */\n" for grep { !m/\b$dbixs_rev_file\b/ } @st;
2535

2636
my $def = "DBIXS_REVISION";
2737
my $rev = scalar @n;
38+
print $fh "#define DBIXS_VERSION $dbiv\n";
39+
print $fh "#define DBIXS_RELEASE $dbir\n";
2840
print $fh "#define $def $rev\n";
2941
close $fh or die "Error closing $dbixs_rev_file: $!\n";
30-
print "Wrote $def $rev to $dbixs_rev_file\n";
42+
print "Wrote $def $rev to $dbixs_rev_file for DBI-$dbiv.$dbir\n";

lib/DBI/Changes.pm

+14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ DBI::Changes - List of significant changes to the DBI
1212
1313
=encoding UTF-8
1414
15+
=head2 Changes in DBI 1.648 - 11 Mar 2025
16+
17+
=over 2
18+
19+
=item *
20+
21+
Correct sprintf usage for trace_msg (issue#132)
22+
23+
=item *
24+
25+
Add DBIXS_VERSION & DBIXS_RELEASE to dbixs_rev.h
26+
27+
=back
28+
1529
=head2 Changes in DBI 1.647 - 20 Jan 2025
1630
1731
=over 2

0 commit comments

Comments
 (0)