diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index bbb163c98..0d5f01c56 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -46,7 +46,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.42.0 + version: v1.45.2 release-build: name: release-build diff --git a/Makefile b/Makefile index bb31ec9c6..3dac85ed8 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ARCH=$(shell uname -m) VERSION=2.28.0 ITERATION := 1 -GOLANGCI_VERSION = 1.32.0 +GOLANGCI_VERSION = 1.45.2 GORELEASER_VERSION = 0.157.0 SOURCE_FILES?=$$(go list ./... | grep -v /vendor/) @@ -14,31 +14,19 @@ BIN_DIR := $(CURDIR)/bin ci: prepare test -$(BIN_DIR)/golangci-lint: $(BIN_DIR)/golangci-lint-${GOLANGCI_VERSION} - @ln -sf golangci-lint-${GOLANGCI_VERSION} $(BIN_DIR)/golangci-lint -$(BIN_DIR)/golangci-lint-${GOLANGCI_VERSION}: - @curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint bash -s -- v${GOLANGCI_VERSION} - @mv $(BIN_DIR)/golangci-lint $@ - -$(BIN_DIR)/goreleaser: $(BIN_DIR)/goreleaser-${GORELEASER_VERSION} - @ln -sf goreleaser-${GORELEASER_VERSION} $(BIN_DIR)/goreleaser -$(BIN_DIR)/goreleaser-${GORELEASER_VERSION}: - @curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | BINARY=goreleaser bash -s -- v${GORELEASER_VERSION} - @mv $(BIN_DIR)/goreleaser $@ - mod: @go mod download @go mod tidy .PHONY: mod -lint: $(BIN_DIR)/golangci-lint +lint: @echo "--- lint all the things" - @$(BIN_DIR)/golangci-lint run ./... + @docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:v$(GOLANGCI_VERSION) golangci-lint run -v .PHONY: lint -lint-fix: $(BIN_DIR)/golangci-lint +lint-fix: @echo "--- lint all the things" - @$(BIN_DIR)/golangci-lint run --fix ./... + @docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:v$(GOLANGCI_VERSION) golangci-lint run -v --fix .PHONY: lint-fix fmt: lint-fix diff --git a/pkg/provider/googleapps/googleapps.go b/pkg/provider/googleapps/googleapps.go index e2ad9e1c7..bf2f4b82c 100644 --- a/pkg/provider/googleapps/googleapps.go +++ b/pkg/provider/googleapps/googleapps.go @@ -238,7 +238,7 @@ func (kc *Client) loadFirstPage(loginDetails *creds.LoginDetails) (string, url.V if loginPageV1 { // Login page v1 postForm = url.Values{ - "bgresponse": []string{"js_disabled"}, + "bgresponse": []string{"js_enabled"}, "checkConnection": []string{""}, "checkedDomains": []string{"youtube"}, "continue": []string{authForm.Get("continue")}, @@ -277,7 +277,7 @@ func (kc *Client) loadFirstPage(loginDetails *creds.LoginDetails) (string, url.V "Email": []string{""}, "Passwd": []string{""}, "TrustDevice": []string{"on"}, - "bgresponse": []string{"js_disabled"}, + "bgresponse": []string{"js_enabled"}, } for _, k := range []string{"TL", "gxf"} { if v, ok := authForm[k]; ok { diff --git a/pkg/shell/shell.go b/pkg/shell/shell.go index 1a2e158a1..f5dd70f43 100644 --- a/pkg/shell/shell.go +++ b/pkg/shell/shell.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package shell diff --git a/pkg/shell/shell_test.go b/pkg/shell/shell_test.go index 096035fcf..5959b6fb1 100644 --- a/pkg/shell/shell_test.go +++ b/pkg/shell/shell_test.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package shell