Use deterministic date for man pages

This commit is contained in:
Alexander Neumann 2017-09-02 09:27:11 +02:00
parent 73d6b15095
commit de8c64e767
23 changed files with 30 additions and 22 deletions

View file

@ -2,6 +2,7 @@ package main
import (
"os"
"time"
"github.com/restic/restic/internal/errors"
"github.com/spf13/cobra"
@ -31,10 +32,17 @@ func init() {
}
func runManpage(cmd *cobra.Command, args []string) error {
// use a fixed date for the man pages so that generating them is deterministic
date, err := time.Parse("Jan 2006", "Jan 2017")
if err != nil {
return err
}
header := &doc.GenManHeader{
Title: "restic backup",
Section: "1",
Source: "generated by `restic manpage`",
Date: &date,
}
dir := manpageOpts.OutputDir

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l

View file

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Aug 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l