Update magefile
This commit is contained in:
parent
1b09d6791a
commit
8740379647
1 changed files with 9 additions and 3 deletions
12
magefile.go
12
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+"/")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue