mirror of
https://github.com/curl/curl.git
synced 2026-07-02 18:17:17 +03:00
docs: use SOURCE_DATE_EPOCH for generated manpages
This should make builds from Git reproducible. Closes #12092
This commit is contained in:
parent
a20d7bd974
commit
1f7d8cd478
2 changed files with 16 additions and 4 deletions
|
|
@ -48,8 +48,14 @@ my %protolong;
|
|||
my %catlong;
|
||||
|
||||
use POSIX qw(strftime);
|
||||
my $date = strftime "%B %d %Y", localtime;
|
||||
my $year = strftime "%Y", localtime;
|
||||
my @ts;
|
||||
if (defined($ENV{SOURCE_DATE_EPOCH})) {
|
||||
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
|
||||
} else {
|
||||
@ts = localtime;
|
||||
}
|
||||
my $date = strftime "%B %d %Y", @ts;
|
||||
my $year = strftime "%Y", @ts;
|
||||
my $version = "unknown";
|
||||
my $globals;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,14 @@
|
|||
my $version="7.41.0";
|
||||
|
||||
use POSIX qw(strftime);
|
||||
my $date = strftime "%b %e, %Y", localtime;
|
||||
my $year = strftime "%Y", localtime;
|
||||
my @ts;
|
||||
if (defined($ENV{SOURCE_DATE_EPOCH})) {
|
||||
@ts = localtime($ENV{SOURCE_DATE_EPOCH});
|
||||
} else {
|
||||
@ts = localtime;
|
||||
}
|
||||
my $date = strftime "%b %e, %Y", @ts;
|
||||
my $year = strftime "%Y", @ts;
|
||||
|
||||
print <<HEADER
|
||||
.\\" **************************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue