From d71cdd14e8313bd3194f34a3a600dfb85068a46c Mon Sep 17 00:00:00 2001 From: Justen Walker Date: Sat, 17 Apr 2021 15:44:38 -0400 Subject: [PATCH] build: add license target --- magefile.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/magefile.go b/magefile.go index 74894f1..10a0c14 100644 --- a/magefile.go +++ b/magefile.go @@ -6,11 +6,10 @@ package main import ( - "encoding/hex" - "os" "archive/zip" "bytes" "crypto/sha256" + "encoding/hex" "encoding/json" "fmt" "github.com/magefile/mage/mg" @@ -22,6 +21,7 @@ import ( "mime" "mime/multipart" "net/http" + "os" "os/exec" "path" "path/filepath" @@ -65,6 +65,13 @@ func Clean() error { return nil } +func License() error { + debug.Println("===> add license header") + return sh.RunV("addlicense", "-v", + "-f", filepath.Join(".", "HEADER"), + "src", "gw", "internal", "test", "main.go", "magefile.go", "pom.xml") +} + // Build the Go binary only func Build() error { localBin = filepath.Join(".", "bin", "goodwill")