diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee8c3a0..bc88344 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,28 @@ jobs: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_windows_amd64.exe CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_amd64 CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_arm64 + CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_arm + CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_386 + CGO_ENABLED=0 GOOS=linux GOARCH=mips go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_mips + CGO_ENABLED=0 GOOS=linux GOARCH=mips64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_mips64 + CGO_ENABLED=0 GOOS=linux GOARCH=mips64le go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_mips64le + CGO_ENABLED=0 GOOS=linux GOARCH=mipsle go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_mipsle + CGO_ENABLED=0 GOOS=linux GOARCH=ppc64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_ppc64 + CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_ppc64le + CGO_ENABLED=0 GOOS=linux GOARCH=riscv64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_riscv64 + CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_linux_s390x + CGO_ENABLED=0 GOOS=netbsd GOARCH=386 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_netbsd_386 + CGO_ENABLED=0 GOOS=netbsd GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_netbsd_amd64 + CGO_ENABLED=0 GOOS=netbsd GOARCH=arm go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_netbsd_arm + CGO_ENABLED=0 GOOS=netbsd GOARCH=arm64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_netbsd_arm64 + CGO_ENABLED=0 GOOS=openbsd GOARCH=386 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_openbsd_386 + CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_openbsd_amd64 + CGO_ENABLED=0 GOOS=openbsd GOARCH=arm go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_openbsd_arm + CGO_ENABLED=0 GOOS=openbsd GOARCH=arm64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_openbsd_arm64 + CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_freebsd_386 + CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_freebsd_amd64 + CGO_ENABLED=0 GOOS=freebsd GOARCH=arm go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_freebsd_arm + CGO_ENABLED=0 GOOS=freebsd GOARCH=arm64 go build -ldflags '-s -w --extldflags "-static -fpic"' -o pty_freebsd_arm64 - uses: "marvinpinto/action-automatic-releases@latest" with: @@ -32,3 +54,25 @@ jobs: pty_windows_amd64.exe pty_linux_amd64 pty_linux_arm64 + pty_linux_arm + pty_linux_386 + pty_linux_mips + pty_linux_mips64 + pty_linux_mips64le + pty_linux_mipsle + pty_linux_ppc64 + pty_linux_ppc64le + pty_linux_riscv64 + pty_linux_s390x + pty_netbsd_386 + pty_netbsd_amd64 + pty_netbsd_arm + pty_netbsd_arm64 + pty_openbsd_386 + pty_openbsd_amd64 + pty_openbsd_arm + pty_openbsd_arm64 + pty_freebsd_386 + pty_freebsd_amd64 + pty_freebsd_arm + pty_freebsd_arm64 diff --git a/go.mod b/go.mod index 0e07cf3..2f766bc 100644 --- a/go.mod +++ b/go.mod @@ -7,18 +7,18 @@ require ( github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b github.com/mattn/go-colorable v0.1.13 github.com/shirou/gopsutil/v3 v3.22.10 - golang.org/x/text v0.3.7 + golang.org/x/text v0.4.0 ) require ( github.com/go-ole/go-ole v1.2.6 // indirect github.com/kr/text v0.2.0 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.4.0 // indirect + github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect + github.com/tklauser/go-sysconf v0.3.11 // indirect + github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect + golang.org/x/sys v0.2.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go.sum b/go.sum index e6f794e..435b0c8 100644 --- a/go.sum +++ b/go.sum @@ -17,16 +17,18 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c h1:VtwQ41oftZwlMnOEbMWQtSEUgU64U4s+GHk7hZK+jtY= +github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c h1:NRoLoZvkBTKvR5gQLgA3e0hqjkY9u1wm+iOL45VN/qI= +github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/shirou/gopsutil/v3 v3.22.10 h1:4KMHdfBRYXGF9skjDWiL4RA2N+E8dRdodU/bOZpPoVg= github.com/shirou/gopsutil/v3 v3.22.10/go.mod h1:QNza6r4YQoydyCfo6rH0blGfKahgibh4dQmV5xdFkQk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -36,10 +38,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -47,10 +51,10 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 h1:Sx/u41w+OwrInGdEckYmEuU5gHoGSL4QbDz3S9s6j4U= -golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/utils/zip.go b/utils/zip.go index 7b6430b..8d9e3ca 100644 --- a/utils/zip.go +++ b/utils/zip.go @@ -35,9 +35,6 @@ func Zip(filePath []string, zipPath string) error { if err != nil { return err } - if path == fPath { - return nil - } var zipfile io.Writer if !strings.HasSuffix(filepath.Dir(fPath), `\`) { fPath = filepath.Dir(fPath) + `\`