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+"/") }