diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-06-24 09:18:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-06-24 09:18:57 +0200 |
commit | 3aade0897751c194370b49790fdd8f7787cc822b (patch) | |
tree | 682b6ddd3c30ef99e46fbea4c3111dab43dad61a /releaser | |
parent | 0e1bda34c3343c42020f1289f849ccf18c39e603 (diff) | |
download | hugo-3aade0897751c194370b49790fdd8f7787cc822b.tar.gz hugo-3aade0897751c194370b49790fdd8f7787cc822b.zip |
releaser: Improve docs submodule handling
Still not optimal.
Diffstat (limited to 'releaser')
-rw-r--r-- | releaser/releaser.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/releaser/releaser.go b/releaser/releaser.go index 0823cd04e..39a785da2 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -142,9 +142,17 @@ func (r *ReleaseHandler) Run() error { } if r.shouldPrepareVersions() { - // Make sure the docs submodule is up to date. - if _, err := git("submodule", "update", "--remote", "--merge"); err != nil { - return err + 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 { |