From 87403796474312e8fc3637788f38733b463bc032 Mon Sep 17 00:00:00 2001 From: Ryan Harg Date: Mon, 16 Sep 2024 13:51:36 +0200 Subject: [PATCH] Update magefile --- magefile.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/magefile.go b/magefile.go index e742f73..f7c9a8f 100644 --- a/magefile.go +++ b/magefile.go @@ -9,13 +9,19 @@ import ( const app = "github-release-bot" -// Build builds and exports the application as a docker image tar file. +// Build builds the application. func Build() error { - return sh.RunV("./gradlew", "clean", "build", "jibBuildTar") + return sh.RunV("./gradlew", "clean", "build") +} + +// BuildImage builds a docke rimage and exports it as a tar file. +func BuildImage() error { + mg.Deps(Build) + return sh.RunV("./gradlew", "jibBuildTar") } // Deploy deploys the application to a specified host via scp. func Deploy(host string) error { - mg.Deps(Build) + mg.Deps(BuildImage) return sh.RunV("scp", "app/build/"+app+".tar", host+":/opt/stacks/"+app+"/") }