Skip to content

Commit 4061a69

Browse files
committed
Use Go 1.20; set golangci-lint from GitHub env
1 parent a6484b1 commit 4061a69

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ on:
44
branches:
55
- main
66
pull_request:
7+
env:
8+
GOLANGCI_LINT_VERSION: v1.51.2
79
jobs:
810
lint:
911
runs-on: ubuntu-latest
1012
steps:
1113
- uses: actions/checkout@v3
1214
- uses: actions/setup-go@v3
1315
with:
14-
go-version: 1.19.x
16+
go-version: 1.20.x
1517
- run: go version
1618
- run: diff -u <(echo -n) <(gofmt -d .)
1719
- name: Run golangci-lint
1820
uses: golangci/golangci-lint-action@v3
1921
with:
20-
version: v1.51.2
22+
version: ${{ env.GOLANGCI_LINT_VERSION }}
2123
args: --verbose

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
test:
99
strategy:
1010
matrix:
11-
go-version: [1.19.x, 1.20.x]
11+
go-version: [1.20.x]
1212
os: [ubuntu-latest, windows-latest]
1313
runs-on: ${{ matrix.os }}
1414
steps:

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export GOBIN := $(MAKEFILE_PATH)/bin
55

66
PATH := $(GOBIN):$(PATH)
77

8+
GOLANGCI_LINT_VERSION=$(shell awk '/GOLANGCI_LINT_VERSION:/ { print $$2 }' .github/workflows/lint.yml)
9+
810
.PHONY: all
911
all: clean format build lint test
1012

@@ -26,7 +28,7 @@ test:
2628
.PHONY: lint
2729
lint:
2830
@echo lint
29-
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
31+
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
3032
@$(GOBIN)/golangci-lint run
3133

3234
.PHONY: format

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The tool to import commits from private GitLab to separate repo. Can be used to
44

55
# Getting Started
66

7-
1. Download and install [Go 1.19](https://go.dev/dl/).
7+
1. Download and install [Go 1.20](https://go.dev/dl/).
88
2. Install the program by running the command in a shell:
99
```shell
1010
go install github.com/alexandear/import-gitlab-commits@latest

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/alexandear/import-gitlab-commits
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/go-git/go-git/v5 v5.2.0

0 commit comments

Comments
 (0)