Skip to content

Commit cc92fea

Browse files
authored
chore: bump dependencies and move tools (#3968)
1 parent 2638d69 commit cc92fea

19 files changed

+512
-552
lines changed

.docker/Dockerfile-alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.20
1+
FROM alpine:3.21
22

33
RUN <<HEREDOC
44
apk add --no-cache --upgrade ca-certificates

.docker/Dockerfile-test-hsm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine3.21 AS builder
1+
FROM golang:1.24-alpine3.21 AS builder
22

33
RUN apk add --no-cache build-base git gcc bash
44

.github/workflows/ci.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@ jobs:
9797
args: --timeout 10m0s
9898
version: v1.64.8
9999
skip-pkg-cache: true
100-
- name: Run go-acc (tests)
100+
- name: Run go tests
101101
run: |
102-
make .bin/go-acc
103-
.bin/go-acc -o coverage.out ./... -- -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension
102+
go test -coverprofile coverage.out -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension ./...
104103
- name: Submit to Codecov
105104
run: |
106105
bash <(curl -s https://codecov.io/bash)

.github/workflows/cve-scan.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
id: hadolint
122122
if: ${{ always() }}
123123
with:
124-
dockerfile: .docker/Dockerfile-build
124+
dockerfile: .docker/Dockerfile-local-build
125125
verbose: true
126126
format: "json"
127127
failure-threshold: "error"

Makefile

+21-41
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,20 @@
11
SHELL=/bin/bash -o pipefail
22

3-
export GO111MODULE := on
4-
export PATH := .bin:${PATH}
5-
export PWD := $(shell pwd)
6-
export IMAGE_TAG := $(if $(IMAGE_TAG),$(IMAGE_TAG),latest)
3+
export PATH := .bin:${PATH}
4+
export PWD := $(shell pwd)
5+
export IMAGE_TAG := $(if $(IMAGE_TAG),$(IMAGE_TAG),latest)
76

87
GOLANGCI_LINT_VERSION = 1.64.8
98

10-
GO_DEPENDENCIES = github.com/ory/go-acc \
11-
github.com/golang/mock/mockgen \
12-
golang.org/x/tools/cmd/goimports \
13-
github.com/go-swagger/go-swagger/cmd/swagger
14-
15-
define make-go-dependency
16-
# go install is responsible for not re-building when the code hasn't changed
17-
.bin/$(notdir $1): go.sum go.mod
18-
GOBIN=$(PWD)/.bin/ go install $1
19-
endef
20-
21-
.bin/golangci-lint-$(GOLANGCI_LINT_VERSION):
9+
.bin/golangci-lint: Makefile
2210
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin v$(GOLANGCI_LINT_VERSION)
23-
mv .bin/golangci-lint .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)
2411

2512
$(foreach dep, $(GO_DEPENDENCIES), $(eval $(call make-go-dependency, $(dep))))
2613

2714
node_modules: package-lock.json
2815
npm ci
2916
touch node_modules
3017

31-
.PHONY: .bin/yq
32-
.bin/yq:
33-
go build -o .bin/yq github.com/mikefarah/yq/v4
34-
3518
.bin/clidoc: go.mod
3619
go build -o .bin/clidoc ./cmd/clidoc/.
3720

@@ -46,14 +29,14 @@ docs/cli: .bin/clidoc
4629
touch .bin/ory
4730

4831
.PHONY: lint
49-
lint: .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)
50-
.bin/golangci-lint-$(GOLANGCI_LINT_VERSION) run -v ./...
32+
lint: .bin/golangci-lint
33+
golangci-lint run -v ./...
5134

5235
# Runs full test suite including tests where databases are enabled
5336
.PHONY: test
54-
test: .bin/go-acc
37+
test:
5538
make test-resetdb
56-
source scripts/test-env.sh && go-acc ./... -- -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension
39+
source scripts/test-env.sh && go test -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension ./...
5740
docker rm -f hydra_test_database_mysql
5841
docker rm -f hydra_test_database_postgres
5942
docker rm -f hydra_test_database_cockroach
@@ -101,22 +84,22 @@ authors: # updates the AUTHORS file
10184

10285
# Formats the code
10386
.PHONY: format
104-
format: .bin/goimports .bin/ory node_modules
105-
.bin/ory dev headers copyright --type=open-source --exclude=internal/httpclient
106-
.bin/goimports -w --local github.com/ory .
87+
format: .bin/ory node_modules
88+
ory dev headers copyright --type=open-source --exclude=internal/httpclient
89+
go tool goimports -w --local github.com/ory .
10790
npm exec -- prettier --write .
10891

10992
# Generates mocks
11093
.PHONY: mocks
111-
mocks: .bin/mockgen
112-
mockgen -package oauth2_test -destination oauth2/oauth2_provider_mock_test.go github.com/ory/fosite OAuth2Provider
113-
mockgen -package jwk_test -destination jwk/registry_mock_test.go -source=jwk/registry.go
94+
mocks:
95+
go tool mockgen -package oauth2_test -destination oauth2/oauth2_provider_mock_test.go github.com/ory/fosite OAuth2Provider
96+
go tool mockgen -package jwk_test -destination jwk/registry_mock_test.go -source=jwk/registry.go
11497
go generate ./...
11598

11699
# Generates the SDKs
117100
.PHONY: sdk
118-
sdk: .bin/swagger .bin/ory node_modules
119-
swagger generate spec -m -o spec/swagger.json \
101+
sdk: .bin/ory node_modules
102+
go tool swagger generate spec -m -o spec/swagger.json \
120103
-c github.com/ory/hydra/v2/client \
121104
-c github.com/ory/hydra/v2/consent \
122105
-c github.com/ory/hydra/v2/flow \
@@ -129,7 +112,7 @@ sdk: .bin/swagger .bin/ory node_modules
129112
-c github.com/ory/x/pagination \
130113
-c github.com/ory/herodot
131114
ory dev swagger sanitize ./spec/swagger.json
132-
swagger validate ./spec/swagger.json
115+
go tool swagger validate ./spec/swagger.json
133116
CIRCLE_PROJECT_USERNAME=ory CIRCLE_PROJECT_REPONAME=hydra \
134117
ory dev openapi migrate \
135118
--health-path-tags metadata \
@@ -191,13 +174,10 @@ install:
191174
go install -tags sqlite,sqlite_omit_load_extension .
192175

193176
.PHONY: post-release
194-
post-release: .bin/yq
195-
yq e '.services.hydra.image = "oryd/hydra:'$$DOCKER_TAG'"' -i quickstart.yml
196-
yq e '.services.hydra-migrate.image = "oryd/hydra:'$$DOCKER_TAG'"' -i quickstart.yml
197-
yq e '.services.consent.image = "oryd/hydra-login-consent-node:'$$DOCKER_TAG'"' -i quickstart.yml
198-
199-
generate: .bin/mockgen
200-
go generate ./...
177+
post-release:
178+
go tool yq e '.services.hydra.image = "oryd/hydra:'$$DOCKER_TAG'"' -i quickstart.yml
179+
go tool yq e '.services.hydra-migrate.image = "oryd/hydra:'$$DOCKER_TAG'"' -i quickstart.yml
180+
go tool yq e '.services.consent.image = "oryd/hydra-login-consent-node:'$$DOCKER_TAG'"' -i quickstart.yml
201181

202182
licenses: .bin/licenses node_modules # checks open-source licenses
203183
.bin/licenses

0 commit comments

Comments
 (0)