Skip to content

Commit

Permalink
build: add license target
Browse files Browse the repository at this point in the history
  • Loading branch information
justenwalker committed Apr 24, 2021
1 parent c1966b1 commit d71cdd1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,6 +21,7 @@ import (
"mime"
"mime/multipart"
"net/http"
"os"
"os/exec"
"path"
"path/filepath"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit d71cdd1

Please sign in to comment.