From eaf2550bed419d8f26951a3e4680ba1514ebb4dd Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 4 Oct 2019 17:01:48 -0400 Subject: [PATCH] Add magefile --- build.go | 12 ++++++++++++ mage.go | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 build.go create mode 100644 mage.go diff --git a/build.go b/build.go new file mode 100644 index 0000000..83d76c7 --- /dev/null +++ b/build.go @@ -0,0 +1,12 @@ +// +build ignore + +package main + +import ( + "github.com/magefile/mage/mage" + "os" +) + +func main() { + os.Exit(mage.Main()) +} diff --git a/mage.go b/mage.go new file mode 100644 index 0000000..2051aea --- /dev/null +++ b/mage.go @@ -0,0 +1,32 @@ +// +build mage + +package main + +import ( + "github.com/magefile/mage/sh" +) + +// Build kbtui with just the basic commands. +func Build() { + sh.Run("go", "build") +} + +// Build kbtui with the basic commands, and the ShowReactions "TypeCommand". +// The ShowReactions TypeCommand will print a message in the feed window when +// a reaction is received in the current conversation. +func BuildShowReactions() { + sh.Run("go", "build", "-tags", "showreactionscmd") +} + +// Build kbtui with the basec commands, and the AutoReact "TypeCommand". +// The AutoReact TypeCommand will automatically react to every message +// received in the current conversation. This gets pretty annoying, and +// is not recommended. +func BuildAutoReact() { + sh.Run("go", "build", "-tags", "autoreactcmd") +} + +// Build kbtui with all Commands and TypeCommands enabled. +func BuildAllCommands() { + sh.Run("go", "build", "-tags", "type_commands") +}