Skip to content

Commit

Permalink
Merge pull request #951 from sudo-bmitch/pr-go-1.17
Browse files Browse the repository at this point in the history
Bump from Go 1.16 to 1.17
  • Loading branch information
vbatts committed Sep 13, 2022
2 parents d2cc46d + 4c15674 commit decdb15
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docs-and-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.16', '1.17']
go: ['1.17', '1.18', '1.19']

name: Documentation and Linting
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: go/src/github.com/opencontainers/image-spec

# commit for v1 release
- uses: actions/setup-go@0caeaed6fd66a828038c2da3c0f662a42862658f
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}

Expand All @@ -40,7 +39,7 @@ jobs:
make docs
- name: documentation artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: oci-docs
path: go/src/github.com/opencontainers/image-spec/output
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ EPOCH_TEST_COMMIT ?= v0.2.0
DOCKER ?= $(shell command -v docker 2>/dev/null)
PANDOC ?= $(shell command -v pandoc 2>/dev/null)

GOPATH:=$(shell go env GOPATH)

OUTPUT_DIRNAME ?= output
DOC_FILENAME ?= oci-image-spec

Expand Down Expand Up @@ -87,7 +89,7 @@ check-license:

lint: .install.lint
@echo "checking lint"
@GO111MODULE=on golangci-lint run
@GO111MODULE=on $(GOPATH)/bin/golangci-lint run

test: schema/fs.go
go test -race -cover $(shell go list ./... | grep -v /vendor/)
Expand All @@ -100,18 +102,22 @@ img/%.png: img/%.dot
.gitvalidation:
@which git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make install.tools' target" && false)
ifdef GITHUB_SHA
git-validation -q -run DCO,short-subject,dangling-whitespace -range $(GITHUB_SHA)..HEAD
$(GOPATH)/bin/git-validation -q -run DCO,short-subject,dangling-whitespace -range $(GITHUB_SHA)..HEAD
else
git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
$(GOPATH)/bin/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..HEAD
endif

install.tools: $(TOOLS:%=.install.%)

.install.lint:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2
case "$$(go env GOVERSION)" in \
go1.17.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3;; \
go1.18.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3;; \
*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest;; \
esac

.install.gitvalidation:
go get -u github.com/vbatts/git-validation
go install github.com/vbatts/git-validation@latest

clean:
rm -rf *~ $(OUTPUT_DIRNAME) header.html
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/opencontainers/image-spec

go 1.16
go 1.17

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -12,3 +12,5 @@ require (
github.com/xeipuuv/gojsonschema v1.2.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

require github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect

0 comments on commit decdb15

Please sign in to comment.