21 lines
480 B
Go
21 lines
480 B
Go
//go:build mage
|
|
|
|
package main
|
|
|
|
import (
|
|
"github.com/magefile/mage/mg"
|
|
"github.com/magefile/mage/sh"
|
|
)
|
|
|
|
const app = "github-release-bot"
|
|
|
|
// Build builds and exports the application as a docker image tar file.
|
|
func Build() error {
|
|
return sh.RunV("./gradlew", "build", "jibBuildTar")
|
|
}
|
|
|
|
// Deploy 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+"/")
|
|
}
|