Skip to content

Commit

Permalink
Sync install script and remove binaries that are no longer in use.
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Jan 29, 2019
1 parent 8389125 commit df395bf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 22 deletions.
12 changes: 0 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Auto-generated install script. Regenerate with [godownloader](https://github.com/goreleaser/godownloader):

godownloader .goreleaser.yml
36 changes: 26 additions & 10 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -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() {
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit df395bf

Please sign in to comment.