22 lines
467 B
Go
22 lines
467 B
Go
|
//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+"/")
|
||
|
}
|