From 5ebbb5f07e39bb634e74992d8a2a3fafd3904482 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 2 Jul 2019 15:00:38 +0200 Subject: [PATCH] Update libs --- CHANGELOG.md | 10 ++++++++-- app/bindata/bindata.go | 10 +++++----- app/util/util.go | 29 +++++++++++++++++------------ build.properties | 4 ++-- go.mod | 13 +++++-------- go.sum | 30 ++++++++++++++---------------- nodejs-portable.conf | 2 +- 7 files changed, 52 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dda5f3..29f8330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,15 @@ # Changelog +## 2.7.0 (2019/07/01) + +* Use HTTPS (Issue #47) +* Update libs +* Go 1.12.4 + ## 2.6.0 (2019/01/31) -* Update deps -* Upgrade to Go 1.11.5 +* Update libs +* Go 1.11.5 ## 2.5.0 (2018/11/18) diff --git a/app/bindata/bindata.go b/app/bindata/bindata.go index e826241..047cc9d 100644 --- a/app/bindata/bindata.go +++ b/app/bindata/bindata.go @@ -20,7 +20,7 @@ import ( func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %v", name, err) } var buf bytes.Buffer @@ -28,7 +28,7 @@ func bindataRead(data []byte, name string) ([]byte, error) { clErr := gz.Close() if err != nil { - return nil, fmt.Errorf("Read %q: %v", name, err) + return nil, fmt.Errorf("read %q: %v", name, err) } if clErr != nil { return nil, err @@ -69,7 +69,7 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } -var _nodejsPortableConf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8c\xb1\x0a\xc2\x30\x14\x45\xf7\x7c\xc5\xe5\x4d\x0a\x92\x88\x43\x91\xac\x8a\x4e\x42\x77\x91\x12\xda\xa7\x0d\x26\x8d\x24\xb1\x0a\xe2\xbf\x4b\xac\x8e\xf7\x9c\xcb\x79\x09\x80\x46\x8e\xc9\x86\x81\x34\x68\x25\x2b\xb9\xa4\x45\xa1\xd6\x7b\xee\xac\xc9\x7c\x08\x1d\x93\xc6\xd9\xb8\xc4\x5f\x93\x7a\x76\xae\xbc\x5b\xdf\x4d\xdf\x47\x88\xd7\xda\xe4\xbe\x40\xa9\xca\x9a\x78\x7b\x4f\x39\xf8\x62\x12\x69\x1c\x05\x00\xd0\x46\xab\x3a\x86\x4b\x34\x1e\x3b\xeb\x38\x61\xf6\x5c\x57\x73\xb5\xb7\x59\xfd\x83\x00\x6d\xb5\x32\x43\xc8\x3d\xc7\xe6\x56\xca\x3f\x2c\xa5\x32\x4d\x64\x67\xb2\x1d\x79\x32\x02\x38\x89\xb7\xf8\x04\x00\x00\xff\xff\x04\x26\xfe\x6f\xcb\x00\x00\x00") +var _nodejsPortableConf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x34\x8c\xb1\x0a\xc2\x30\x14\x45\xf7\x7c\xc5\xe5\x4d\x0a\x92\x88\x83\x4a\x56\x45\x27\xa1\xbb\x48\x09\xed\xd3\x06\x93\x46\x92\x58\x05\xf1\xdf\x25\x56\xc7\x7b\xce\xe5\xbc\x04\x40\x03\xc7\x64\x43\x4f\x1a\xb4\x90\x2b\x39\xa7\x59\xa1\xd6\x7b\x6e\xad\xc9\x7c\x08\x2d\x93\xc6\xd9\xb8\xc4\x5f\x93\x3a\x76\xae\xbc\x1b\xdf\x8e\xdf\x47\x88\xd7\xca\xe4\xae\x40\xa9\xca\x1a\x79\x73\x4f\x39\xf8\x62\x12\x69\x1c\x05\x00\xd0\x46\xab\x2a\x86\x4b\x34\x1e\x3b\xeb\x38\x61\xf2\x5c\x2f\xa7\x6a\x6f\xb3\xfa\x07\x01\xda\x6a\x65\xfa\x90\x3b\x8e\xf5\xad\x94\x7f\x58\x4a\x65\xea\xc8\xce\x64\x3b\xf0\x68\x04\x70\x12\x6f\xf1\x09\x00\x00\xff\xff\x27\xb5\xd9\xf2\xcb\x00\x00\x00") func nodejsPortableConfBytes() ([]byte, error) { return bindataRead( @@ -84,8 +84,8 @@ func nodejsPortableConf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "nodejs-portable.conf", size: 203, mode: os.FileMode(438), modTime: time.Unix(1548972284, 0)} - a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x48, 0x4e, 0xd2, 0xdb, 0x56, 0x5d, 0xde, 0xd2, 0x69, 0xcc, 0x2e, 0x63, 0xe1, 0xfd, 0xf2, 0xc3, 0xd1, 0x35, 0x83, 0xb6, 0x35, 0x49, 0xc9, 0xdc, 0xc1, 0xd, 0x80, 0xf9, 0x9d, 0xaa, 0x5a, 0xa8}} + info := bindataFileInfo{name: "nodejs-portable.conf", size: 203, mode: os.FileMode(0666), modTime: time.Unix(1561993459, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x70, 0xf3, 0x35, 0x92, 0x90, 0x24, 0x42, 0x7f, 0x49, 0xe5, 0x84, 0x1a, 0x8f, 0xda, 0x8c, 0x6, 0x31, 0xf8, 0x26, 0x58, 0x3d, 0x6a, 0xa3, 0xd4, 0xf3, 0x1c, 0x54, 0x6d, 0x40, 0xe5, 0xca, 0x95}} return a, nil } diff --git a/app/util/util.go b/app/util/util.go index 8a87e4d..61b0c86 100644 --- a/app/util/util.go +++ b/app/util/util.go @@ -28,27 +28,32 @@ type Lib struct { // DownloadFile downloads a file and display status func DownloadFile(filename string, url string) error { - req, err := grab.NewRequest(url) + req, err := grab.NewRequest(filename, url) if err != nil { return err } - req.Filename = filename - - respch := grab.DefaultClient.DoAsync(req) - resp := <-respch + resp := grab.DefaultClient.Do(req) ticker := time.NewTicker(200 * time.Millisecond) - for range ticker.C { - if resp.IsComplete() { - if resp.Error != nil { - return resp.Error + defer ticker.Stop() + +Loop: + for { + select { + case <-ticker.C: + fmt.Print(".") + case <-resp.Done: + if resp.Err() != nil { + return resp.Err() } - break + break Loop } - fmt.Print(".") } - ticker.Stop() + if err := resp.Err(); err != nil { + return resp.Err() + } + return nil } diff --git a/build.properties b/build.properties index df3f5d1..baf14bc 100644 --- a/build.properties +++ b/build.properties @@ -6,9 +6,9 @@ app.name = Node.js Portable app.desc = Make Node.js portable on Windows app.package = github.com/crazy-max/nodejs-portable app.url = https://${app.package} -app.version = 2.6.0 +app.version = 2.7.0 app.default.release = 0 # Libs antcontrib.url = http://search.maven.org/remotecontent?filepath=ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar -upx.url = https://github.com/upx/upx/releases/download/v3.94/upx394w.zip +upx.url = https://github.com/upx/upx/releases/download/v3.95/upx-3.95-win32.zip diff --git a/go.mod b/go.mod index dc381bf..d52e599 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,12 @@ module github.com/crazy-max/nodejs-portable require ( - github.com/akavel/rsrc v0.0.0-20170831122431-f6a15ece2cfd // indirect - github.com/cavaliercoder/grab v1.0.0 - github.com/djherbis/times v1.0.1 // indirect + github.com/akavel/rsrc v0.8.0 // indirect + github.com/cavaliercoder/grab v2.0.0+incompatible github.com/fatih/color v1.7.0 - github.com/josephspurrier/goversioninfo v0.0.0-20180220052333-42534847954b + github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd github.com/kevinburke/go-bindata v3.13.0+incompatible - github.com/mattn/go-colorable v0.0.9 // indirect - github.com/mattn/go-isatty v0.0.3 // indirect - github.com/mcuadros/go-version v0.0.0-20171003094716-88e56e02bea1 + github.com/mattn/go-colorable v0.1.2 // indirect + github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 - golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5 // indirect ) diff --git a/go.sum b/go.sum index e86f1ac..91a923e 100644 --- a/go.sum +++ b/go.sum @@ -1,22 +1,20 @@ -github.com/akavel/rsrc v0.0.0-20170831122431-f6a15ece2cfd h1:yumR8733CaQ3P76MFbIbBKdrJmy4EqnQ5DIhqq8gq2Q= -github.com/akavel/rsrc v0.0.0-20170831122431-f6a15ece2cfd/go.mod h1:2+aQMrY0hBFBaIr2xxnZ/ctfwnYmMRMbTczYLAC34v4= -github.com/cavaliercoder/grab v1.0.0 h1:H6VQ1NiLO7AvXM6ZyaInnoZrRLeo2FoUTQEcXln4bvQ= -github.com/cavaliercoder/grab v1.0.0/go.mod h1:tTBkfNqSBfuMmMBFaO2phgyhdYhiZQ/+iXCZDzcDsMI= -github.com/djherbis/times v1.0.1 h1:nVRrVOTFd2r0C7wCQdIDz/fqt8yO0EEzr5f6aXfXiS0= -github.com/djherbis/times v1.0.1/go.mod h1:CGMZlo255K5r4Yw0b9RRfFQpM2y7uOmxg4jm9HsaVf8= +github.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw= +github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/cavaliercoder/grab v2.0.0+incompatible h1:wZHbBQx56+Yxjx2TCGDcenhh3cJn7cCLMfkEPmySTSE= +github.com/cavaliercoder/grab v2.0.0+incompatible/go.mod h1:tTBkfNqSBfuMmMBFaO2phgyhdYhiZQ/+iXCZDzcDsMI= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/josephspurrier/goversioninfo v0.0.0-20180220052333-42534847954b h1:66x3jAln/h7rEkx8V1c6zAP/IW4tOlN21OLAJ9d1Vvg= -github.com/josephspurrier/goversioninfo v0.0.0-20180220052333-42534847954b/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE= +github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd h1:KikNiFwUO3QLyeKyN4k9yBH9Pcu/gU/yficWi61cJIw= +github.com/josephspurrier/goversioninfo v0.0.0-20190209210621-63e6d1acd3dd/go.mod h1:eJTEwMjXb7kZ633hO3Ln9mBUCOjX2+FlTljvpl9SYdE= github.com/kevinburke/go-bindata v3.13.0+incompatible h1:hThDhUBH4KjTyhfXfOgacEPfFBNjltnzl/xzfLfrPoQ= github.com/kevinburke/go-bindata v3.13.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mcuadros/go-version v0.0.0-20171003094716-88e56e02bea1 h1:4yXas1DDHpauOfuyfmAMm+EB+SiqPKEoTdc88XEJHsc= -github.com/mcuadros/go-version v0.0.0-20171003094716-88e56e02bea1/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= +github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75 h1:Pijfgr7ZuvX7QIQiEwLdRVr3RoMG+i0SbBO1Qu+7yVk= +github.com/mcuadros/go-version v0.0.0-20190308113854-92cdf37c5b75/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5 h1:MF92a0wJ3gzSUVBpjcwdrDr5+klMFRNEEu6Mev4n00I= -golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/nodejs-portable.conf b/nodejs-portable.conf index de9daca..63d53d0 100644 --- a/nodejs-portable.conf +++ b/nodejs-portable.conf @@ -1,5 +1,5 @@ { - "version": "2.6.0", + "version": "2.7.0", "immediateMode": false, "shell": "cmd", "workPath": "./work",