From 3ca47d18cd9aa8642f7af7ab468c101609ff5bf1 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 9 Aug 2019 22:26:54 -0600 Subject: [PATCH] bugfix tar.gz packaging --- build-all.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build-all.go b/build-all.go index e5b0f49..957f46e 100644 --- a/build-all.go +++ b/build-all.go @@ -262,7 +262,7 @@ func main() { } //fis, err := ioutil.ReadDir(npmdir) - fi, err := os.Stat(npmdir) + fi, err := os.Stat(outdir) if nil != err { panic("stat:" + err.Error()) } @@ -271,7 +271,7 @@ func main() { case "zip": err = Zip(f, outdir, "") if nil != err { - panic("tarError:" + err.Error()) + panic("zipError:" + err.Error()) } case "tar.gz": // Write out the tar @@ -281,8 +281,9 @@ func main() { tw := tar.NewWriter(zw) defer tw.Close() - //err = tarDir(tw, npmdir, fis, "") - err = tarEntry(tw, "", fi, npmdir) + // TODO create Tar() in go-examples + //err = tarDir(tw, outdir, fis, "") + err = tarEntry(tw, "", fi, outdir) if nil != err { panic("tarError:" + err.Error()) }