sshrimp/magefile.go
lordwelch be7e7d8541 Revert "replace github.com/stoggi/aws-oidc with internal/aws-oidc"
Replace github.com/stoggi/aws-oidc with git.narnian.us/lordwelch/aws-oidc
Update import paths to git.narnian.us/lordwelch/sshrimp
Remove unnecessary logging

This reverts commit 2ae68a7e316f6f692a4773ba4d2702bf144d5155.
2020-12-05 22:21:55 -08:00

39 lines
756 B
Go

//+build mage
package main
import (
"fmt"
"os"
"github.com/magefile/mage/mg"
// mage:import ca
"git.narnian.us/lordwelch/sshrimp/tools/mage/ca"
// mage:import agent
"git.narnian.us/lordwelch/sshrimp/tools/mage/agent"
)
var Default = All
// Builds all the targets
func Build() {
mg.Deps(ca.Build, agent.Build)
}
// Remove all build output (except generated configuration files)
func Clean() {
mg.Deps(ca.Clean, agent.Clean)
}
// Build and deploy the ca and agent
func All() {
mg.Deps(agent.Build, ca.Package, ca.Generate)
if _, err := os.Stat("./terraform"); os.IsNotExist(err) {
fmt.Println("All done. Run `terraform init` then `terraform apply` to deploy.")
} else {
fmt.Println("All done. Run `terraform apply` to deploy.")
}
}