mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-30 03:20:42 -05:00
fix(build): prepare xgo once during release
Otherwise each release step will pull the image, which makes for a lot of duplication
This commit is contained in:
10
magefile.go
10
magefile.go
@@ -668,7 +668,7 @@ type Release mg.Namespace
|
||||
// Runs all steps in the right order to create release packages for various platforms
|
||||
func (Release) Release(ctx context.Context) error {
|
||||
mg.Deps(initVars)
|
||||
mg.Deps(Release.Dirs)
|
||||
mg.Deps(Release.Dirs, prepareXgo)
|
||||
|
||||
// Run compiling in parallel to speed it up
|
||||
errs, _ := errgroup.WithContext(ctx)
|
||||
@@ -708,6 +708,14 @@ func (Release) Dirs() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func prepareXgo() {
|
||||
mg.Deps(initVars)
|
||||
checkAndInstallGoTool("xgo", "src.techknowlogick.com/xgo")
|
||||
|
||||
fmt.Println("Pulling latest xgo docker image...")
|
||||
runAndStreamOutput("docker", "pull", "ghcr.io/techknowlogick/xgo:latest")
|
||||
}
|
||||
|
||||
func runXgo(targets string) error {
|
||||
mg.Deps(initVars)
|
||||
checkAndInstallGoTool("xgo", "src.techknowlogick.com/xgo")
|
||||
|
||||
Reference in New Issue
Block a user