Build with Magefile #104341

Merged
Sybren A. Stüvel merged 26 commits from magefile into main 2024-10-04 21:59:46 +02:00
2 changed files with 0 additions and 29 deletions
Showing only changes of commit e829ec1353 - Show all commits

View File

@ -34,7 +34,6 @@ func main() {
anyFileWasChanged = anyFileWasChanged || updateMakefile()
}
anyFileWasChanged = anyFileWasChanged || updateAddon()
anyFileWasChanged = anyFileWasChanged || updateWebsite()
if !anyFileWasChanged {
log.Warn().Msg("nothing changed")

View File

@ -1,28 +0,0 @@
package main
import (
"fmt"
"strings"
"github.com/rs/zerolog/log"
)
const websiteFile = "web/project-website/data/flamenco.yaml"
// updateWebsite changes the version number of the latest version in the project
// website.
// Returns whether the file actually changed.
func updateWebsite() bool {
replacer := func(line string) string {
if !strings.HasPrefix(line, "latestVersion: ") {
return line
}
return fmt.Sprintf("latestVersion: %q", cliArgs.newVersion)
}
fileWasChanged, err := updateLines(websiteFile, replacer)
if err != nil {
log.Fatal().Err(err).Msg("error updating project website")
}
return fileWasChanged
}