github-releases-bot/magefile.go

22 lines
467 B
Go
Raw Normal View History

2024-07-11 10:29:54 +02:00
//go:build mage
package main
import (
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
)
const app = "github-release-bot"
// Builds and exports the application as a docker image tar file.
func build() error {
return sh.RunV("./gradlew", "build", "jibBuildTar")
}
// Deploys the application to a specified host via scp.
func Deploy(host string) error {
mg.Deps(build)
return sh.RunV("scp", "app/build/"+app+".tar", host+":/opt/stacks/"+app+"/")
}