You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
hexmap/magefile.go

32 lines
761 B

// +build mage
package main
import (
"context"
"git.reya.zone/reya/hexmap/proto"
// mage:import server
"git.reya.zone/reya/hexmap/server"
"github.com/magefile/mage/mg"
// mage:import client
"git.reya.zone/reya/hexmap/client"
)
type Protobuf mg.Namespace
func (Protobuf) InstallPlugins(ctx context.Context) error {
mg.CtxDeps(ctx, server.Protobuf.InstallPlugins, client.Protobuf.InstallPlugins)
return nil
}
func (Protobuf) Build(ctx context.Context) error {
mg.SerialCtxDeps(ctx, Protobuf.Clean, Protobuf.InstallPlugins)
return proto.Compile(ctx, []proto.ProtocFlagsFunc{server.ProtocFlags, client.ProtocFlags})
}
func (Protobuf) Clean(ctx context.Context) error {
mg.CtxDeps(ctx, server.Protobuf.Clean, client.Protobuf.Clean)
return nil
}