From df395bfa67c5d0630d936c0044cf07ff05086655 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Wed, 30 Jan 2019 09:24:03 +1100 Subject: [PATCH] Sync install script and remove binaries that are no longer in use. --- .goreleaser.yml | 12 ------------ scripts/README.md | 3 +++ scripts/install.sh | 36 ++++++++++++++++++++++++++---------- 3 files changed, 29 insertions(+), 22 deletions(-) create mode 100644 scripts/README.md diff --git a/.goreleaser.yml b/.goreleaser.yml index 856cb67a..f0233ab9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -149,18 +149,6 @@ builds: env: *env main: ./_linters/src/golang.org/x/tools/cmd/gotype - - binary: gosimple - goos: *goos - goarch: *goarch - env: *env - main: ./_linters/src/honnef.co/go/tools/cmd/gosimple - - - binary: megacheck - goos: *goos - goarch: *goarch - env: *env - main: ./_linters/src/honnef.co/go/tools/cmd/megacheck - - binary: staticcheck goos: *goos goarch: *goarch diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 00000000..b31b3925 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,3 @@ +Auto-generated install script. Regenerate with [godownloader](https://github.com/goreleaser/godownloader): + + godownloader .goreleaser.yml diff --git a/scripts/install.sh b/scripts/install.sh index 769a3d7a..4e08154f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,6 +1,6 @@ #!/bin/sh set -e -# Code generated by godownloader on 2018-09-06T00:26:55Z. DO NOT EDIT. +# Code generated by godownloader on 2019-01-29T22:20:43Z. DO NOT EDIT. # usage() { @@ -9,7 +9,7 @@ usage() { $this: download go binaries for alecthomas/gometalinter Usage: $this [-b] bindir [-d] [tag] - -b sets bindir or installation directory. If not provided, checks for GOPATH bin. Otherwise defaults to ./bin + -b sets bindir or installation directory, Defaults to ./bin -d turns on debug logging [tag] is a tag from https://github.com/alecthomas/gometalinter/releases @@ -23,11 +23,9 @@ EOF } parse_args() { - #BINDIR is ./bin unless set be ENV or GOPATH is not set + #BINDIR is ./bin unless set be ENV # over-ridden by flag below - test -n "$GOPATH" && BINDIR="${GOPATH}/bin" - BINDIR=${BINDIR:-./bin} while getopts "b:dh?" arg; do case "$arg" in @@ -53,7 +51,7 @@ execute() { rm -rf "${srcdir}" (cd "${tmpdir}" && untar "${TARBALL}") install -d "${BINDIR}" - for binexe in "gometalinter" "gocyclo" "nakedret" "misspell" "gosec" "golint" "ineffassign" "goconst" "errcheck" "maligned" "unconvert" "dupl" "structcheck" "varcheck" "safesql" "deadcode" "lll" "goimports" "gotype" "gosimple" "megacheck" "staticcheck" "unused" "interfacer" "unparam" "gochecknoinits" "gochecknoglobals" ; do + for binexe in "gometalinter" "gocyclo" "nakedret" "misspell" "gosec" "golint" "ineffassign" "goconst" "errcheck" "maligned" "unconvert" "dupl" "structcheck" "varcheck" "safesql" "deadcode" "lll" "goimports" "gotype" "staticcheck" "interfacer" "unparam" "gochecknoinits" "gochecknoglobals" ; do if [ "$OS" = "windows" ]; then binexe="${binexe}.exe" fi @@ -67,10 +65,28 @@ is_supported_platform() { case "$platform" in darwin/amd64) found=0 ;; darwin/i386) found=0 ;; + darwin/arm64) found=0 ;; + darwin/ppc64le) found=0 ;; windows/amd64) found=0 ;; windows/i386) found=0 ;; + windows/arm64) found=0 ;; + windows/ppc64le) found=0 ;; linux/amd64) found=0 ;; linux/i386) found=0 ;; + linux/arm64) found=0 ;; + linux/ppc64le) found=0 ;; + freebsd/amd64) found=0 ;; + freebsd/i386) found=0 ;; + freebsd/arm64) found=0 ;; + freebsd/ppc64le) found=0 ;; + openbsd/amd64) found=0 ;; + openbsd/i386) found=0 ;; + openbsd/arm64) found=0 ;; + openbsd/ppc64le) found=0 ;; + netbsd/amd64) found=0 ;; + netbsd/i386) found=0 ;; + netbsd/arm64) found=0 ;; + netbsd/ppc64le) found=0 ;; esac return $found } @@ -99,8 +115,8 @@ tag_to_version() { VERSION=${TAG#v} } adjust_format() { - # change format (tar.gz or zip) based on OS - case ${OS} in + # change format (tar.gz or zip) based on ARCH + case ${ARCH} in windows) FORMAT=zip ;; esac true @@ -174,7 +190,7 @@ log_crit() { uname_os() { os=$(uname -s | tr '[:upper:]' '[:lower:]') case "$os" in - msys_nt*) os="windows" ;; + msys_nt) os="windows" ;; esac echo "$os" } @@ -358,7 +374,7 @@ PREFIX="$OWNER/$REPO" # use in logging routines log_prefix() { - echo "$PREFIX" + echo "$PREFIX" } PLATFORM="${OS}/${ARCH}" GITHUB_DOWNLOAD=https://github.com/${OWNER}/${REPO}/releases/download