forked from TrueCloudLab/restic
Use deterministic date for man pages
This commit is contained in:
parent
73d6b15095
commit
de8c64e767
23 changed files with 30 additions and 22 deletions
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/restic/restic/internal/errors"
|
"github.com/restic/restic/internal/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -31,10 +32,17 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runManpage(cmd *cobra.Command, args []string) error {
|
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{
|
header := &doc.GenManHeader{
|
||||||
Title: "restic backup",
|
Title: "restic backup",
|
||||||
Section: "1",
|
Section: "1",
|
||||||
Source: "generated by `restic manpage`",
|
Source: "generated by `restic manpage`",
|
||||||
|
Date: &date,
|
||||||
}
|
}
|
||||||
|
|
||||||
dir := manpageOpts.OutputDir
|
dir := manpageOpts.OutputDir
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
|
@ -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
|
.nh
|
||||||
.ad l
|
.ad l
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue