Skip to content

Commit 9da54ab

Browse files
committed
Update to Go v1.22.2
- Update to Go v1.22.2 - Address golang.org/x/net vulnerability - Add common Makefile targets - Update .gitignore
1 parent 94eae17 commit 9da54ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1089
-212
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ _tmp/
44
coverprofile.out
55
debug
66
deploy/
7+
*.test

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ dist: jammy
33
language: go
44

55
go:
6-
- 1.22.1
6+
- 1.22.2
77

88
services:
99
- docker
1010

1111
env:
1212
global:
1313
- MONGODB=6.0.14
14-
- MONGOSH=2.2.2
14+
- MONGOSH=2.2.3
1515

1616
cache:
1717
directories:

Dockerfile.auth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.blob

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.data

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.migrations

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.prescription

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.task

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN apk --no-cache update && \
55
apk --no-cache upgrade && \

Dockerfile.tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Development
2-
FROM golang:1.22.1-alpine AS development
2+
FROM golang:1.22.2-alpine AS development
33
WORKDIR /go/src/github.com/tidepool-org/platform
44
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories && \
55
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories && \

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ VERSION_PACKAGE:=$(REPOSITORY_PACKAGE)/application
2222
GO_BUILD_FLAGS:=-buildvcs=false
2323
GO_LD_FLAGS:=-ldflags '-X $(VERSION_PACKAGE).VersionBase=$(VERSION_BASE) -X $(VERSION_PACKAGE).VersionShortCommit=$(VERSION_SHORT_COMMIT) -X $(VERSION_PACKAGE).VersionFullCommit=$(VERSION_FULL_COMMIT)'
2424

25-
FIND_MAIN_CMD:=find . -path './$(BUILD)*' -not -path './vendor/*' -name '*.go' -not -name '*_test.go' -type f -exec egrep -l '^\s*func\s+main\s*(\s*)' {} \;
25+
FIND_MAIN_CMD:=find . -path './$(BUILD)*' -not -path './.gvm_local/*' -not -path './vendor/*' -name '*.go' -not -name '*_test.go' -type f -exec egrep -l '^\s*func\s+main\s*(\s*)' {} \;
2626
TRANSFORM_GO_BUILD_CMD:=sed 's|\.\(.*\)\(/[^/]*\)/[^/]*|_bin\1\2\2 .\1\2/.|'
2727

2828
GO_BUILD_CMD:=go build $(GO_BUILD_FLAGS) $(GO_LD_FLAGS) -o
@@ -96,13 +96,13 @@ ci-generate: generate format-write-changed imports-write-changed
9696
format:
9797
@echo "gofmt -d -e -s"
9898
@cd $(ROOT_DIRECTORY) && \
99-
O=`find . -not -path './vendor/*' -name '*.go' -type f -exec gofmt -d -e -s {} \; 2>&1` && \
99+
O=`find . -not -path './.gvm_local/*' -not -path './vendor/*' -name '*.go' -type f -exec gofmt -d -e -s {} \; 2>&1` && \
100100
[ -z "$${O}" ] || (echo "$${O}" && exit 1)
101101

102102
format-write:
103103
@echo "gofmt -e -s -w"
104104
@cd $(ROOT_DIRECTORY) && \
105-
O=`find . -not -path './vendor/*' -name '*.go' -type f -exec gofmt -e -s -w {} \; 2>&1` && \
105+
O=`find . -not -path './.gvm_local/*' -not -path './vendor/*' -name '*.go' -type f -exec gofmt -e -s -w {} \; 2>&1` && \
106106
[ -z "$${O}" ] || (echo "$${O}" && exit 1)
107107

108108
format-write-changed:
@@ -112,13 +112,13 @@ format-write-changed:
112112
imports: goimports
113113
@echo "goimports -d -e -local 'github.com/tidepool-org/platform'"
114114
@cd $(ROOT_DIRECTORY) && \
115-
O=`find . -not -path './vendor/*' -not -path '**/test/mock.go' -name '*.go' -type f -exec goimports -d -e -local 'github.com/tidepool-org/platform' {} \; 2>&1` && \
115+
O=`find . -not -path './.gvm_local/*' -not -path './vendor/*' -not -path '**/test/mock.go' -name '*.go' -type f -exec goimports -d -e -local 'github.com/tidepool-org/platform' {} \; 2>&1` && \
116116
[ -z "$${O}" ] || (echo "$${O}" && exit 1)
117117

118118
imports-write: goimports
119119
@echo "goimports -e -w -local 'github.com/tidepool-org/platform'"
120120
@cd $(ROOT_DIRECTORY) && \
121-
O=`find . -not -path './vendor/*' -name '*.go' -type f -exec goimports -e -w -local 'github.com/tidepool-org/platform' {} \; 2>&1` && \
121+
O=`find . -not -path './.gvm_local/*' -not -path './vendor/*' -name '*.go' -type f -exec goimports -e -w -local 'github.com/tidepool-org/platform' {} \; 2>&1` && \
122122
[ -z "$${O}" ] || (echo "$${O}" && exit 1)
123123

124124
imports-write-changed: goimports
@@ -137,7 +137,7 @@ vet-ignore:
137137
lint: golint tmp
138138
@echo "golint"
139139
@cd $(ROOT_DIRECTORY) && \
140-
find . -not -path './vendor/*' -name '*.go' -type f | sort -d | xargs -I {} golint {} | grep -v 'exported.*should have comment.*or be unexported' 2> _tmp/golint.out > _tmp/golint.out || [ $${?} == 1 ] && \
140+
find . -not -path './.gvm_local/*' -not -path './vendor/*' -name '*.go' -type f | sort -d | xargs -I {} golint {} | grep -v 'exported.*should have comment.*or be unexported' 2> _tmp/golint.out > _tmp/golint.out || [ $${?} == 1 ] && \
141141
diff .golintignore _tmp/golint.out || \
142142
exit 0
143143

@@ -325,7 +325,8 @@ clean-deploy:
325325

326326
clean-all: clean
327327

328-
pre-commit: format imports vet lint
328+
pre-commit: format imports vet
329+
# pre-commit: format imports vet lint
329330

330331
gopath-implode:
331332
cd $(REPOSITORY_GOPATH) && rm -rf bin pkg && find src -not -path "src/$(REPOSITORY_PACKAGE)/*" -type f -delete && find src -not -path "src/$(REPOSITORY_PACKAGE)/*" -type d -empty -delete

0 commit comments

Comments
 (0)