aboutsummaryrefslogtreecommitdiffhomepage
path: root/releaser
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-06-24 09:18:57 +0200
committerBjørn Erik Pedersen <[email protected]>2017-06-24 09:18:57 +0200
commit3aade0897751c194370b49790fdd8f7787cc822b (patch)
tree682b6ddd3c30ef99e46fbea4c3111dab43dad61a /releaser
parent0e1bda34c3343c42020f1289f849ccf18c39e603 (diff)
downloadhugo-3aade0897751c194370b49790fdd8f7787cc822b.tar.gz
hugo-3aade0897751c194370b49790fdd8f7787cc822b.zip
releaser: Improve docs submodule handling
Still not optimal.
Diffstat (limited to 'releaser')
-rw-r--r--releaser/releaser.go14
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 {