mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
releaser: Try to fix the last failing step
This commit is contained in:
parent
420f26b6bb
commit
74b9b8a229
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2017-present The Hugo Authors. All rights reserved.
|
// Copyright 2024 The Hugo Authors. All rights reserved.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -92,6 +92,8 @@ func (r *ReleaseHandler) Run() error {
|
||||||
mainVersion := newVersion
|
mainVersion := newVersion
|
||||||
mainVersion.PatchLevel = 0
|
mainVersion.PatchLevel = 0
|
||||||
|
|
||||||
|
r.gitPull()
|
||||||
|
|
||||||
defer r.gitPush()
|
defer r.gitPush()
|
||||||
|
|
||||||
if r.step == 1 {
|
if r.step == 1 {
|
||||||
|
@ -178,6 +180,12 @@ func (r ReleaseHandler) calculateVersions() (hugo.Version, hugo.Version) {
|
||||||
return newVersion, finalVersion
|
return newVersion, finalVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *ReleaseHandler) gitPull() {
|
||||||
|
if _, err := r.git("pull", "origin", "HEAD"); err != nil {
|
||||||
|
log.Fatal("pull failed:", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (r *ReleaseHandler) gitPush() {
|
func (r *ReleaseHandler) gitPush() {
|
||||||
if r.skipPush {
|
if r.skipPush {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue