2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 12:55:18 +00:00

Add CI test for manpages

This commit is contained in:
Alexander Neumann 2017-08-05 11:02:00 +02:00
parent 57d198f99a
commit 52c5da997b

View File

@ -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
}