releaser: Improve docs submodule handling

Still not optimal.
This commit is contained in:
Bjørn Erik Pedersen 2017-06-24 09:18:57 +02:00
parent 0e1bda34c3
commit 3aade08977

View file

@ -142,10 +142,18 @@ func (r *ReleaseHandler) Run() error {
}
if r.shouldPrepareVersions() {
if newVersion.PatchLevel == 0 {
// Make sure the docs submodule is up to date.
// TODO(bep) improve this. Maybe it was not such a good idea to do
// this in the sobmodule directly.
if _, err := git("submodule", "update", "--init"); err != nil {
return err
}
//git submodule update
if _, err := git("submodule", "update", "--remote", "--merge"); err != nil {
return err
}
}
// TODO(bep) the above may not have changed anything.
if _, err := git("commit", "-a", "-m", fmt.Sprintf("%s Update /docs [ci skip]", commitPrefix)); err != nil {
return err