diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-08-07 23:27:22 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-08-07 23:27:22 +0100 |
commit | f089aaf1b66309756d3ee0e44cab30e17139b71a (patch) | |
tree | b9c85d7efab539505faa6847fa5bfd0229ad2217 /generate/static | |
parent | b79648e0304dc5eb49b2f6f007e7ef750d729390 (diff) |
Add a tool to create empty migrations
Diffstat (limited to 'generate/static')
-rw-r--r-- | generate/static/static.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/generate/static/static.go b/generate/static/static.go new file mode 100644 index 0000000..c8e7f43 --- /dev/null +++ b/generate/static/static.go @@ -0,0 +1,24 @@ +package main + +//go:generate go run static.go + +import ( + "context" + "log" + "os/exec" + "strings" + + "github.com/gobuffalo/packr/builder" +) + +func main() { + root, err := exec.Command("git", "rev-parse", "--show-toplevel").Output() + if err != nil { + log.Fatal(err) + } + b := builder.New(context.Background(), strings.TrimSpace(string(root))) + b.Compress = true + if err := b.Run(); err != nil { + log.Fatal(err) + } +} |