mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 04:45:15 +00:00
Add CI test for manpages
This commit is contained in:
parent
57d198f99a
commit
52c5da997b
@ -208,6 +208,7 @@ func (env *TravisEnvironment) RunTests() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// check for forbidden imports
|
||||
deps, err := findImports()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -227,6 +228,20 @@ func (env *TravisEnvironment) RunTests() error {
|
||||
return errors.New("CI: forbidden imports found")
|
||||
}
|
||||
|
||||
// check that the man pages are up to date
|
||||
manpath := filepath.Join("doc", "new-man")
|
||||
if err := os.MkdirAll(manpath, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := run("./restic", "manpage", "--output-dir", manpath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := run("diff", "-aur", filepath.Join("doc/man"), manpath); err != nil {
|
||||
return fmt.Errorf("========== man pages are not up to date\nplease run `restic manpage --output-dir doc/man`\n%v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user