Skip to content

Commit c2f1469

Browse files
Migrate authority of go version (gotify/build -> go.mod -> GO_VERSION)
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
1 parent 3000357 commit c2f1469

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ LICENSE_DIR=./licenses/
22
BUILD_DIR=./build
33
DOCKER_DIR=./docker/
44
SHELL := /bin/bash
5-
GO_VERSION=`cat GO_VERSION`
5+
ifndef GOTOOLCHAIN
6+
GO_VERSION=$(GOTOOLCHAIN)
7+
else
8+
GO_VERSION=$(shell go mod edit -json | jq -r .Toolchain)
9+
endif
610
DOCKER_BUILD_IMAGE=gotify/build
711
DOCKER_WORKDIR=/proj
812
DOCKER_RUN=docker run --rm -e LD_FLAGS="$$LD_FLAGS" -v "$$PWD/.:${DOCKER_WORKDIR}" -v "`go env GOPATH`/pkg/mod/.:/go/pkg/mod:ro" -w ${DOCKER_WORKDIR}
@@ -100,7 +104,7 @@ build-docker-multiarch: require-version
100104
-t ghcr.io/gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -2) \
101105
-t ghcr.io/gotify/server-riscv64:$(shell echo $(VERSION) | cut -d '.' -f -1) \
102106
--build-arg RUN_TESTS=$(DOCKER_TEST_LEVEL) \
103-
--build-arg GO_VERSION=$(shell cat GO_VERSION) \
107+
--build-arg GO_VERSION=$(GO_VERSION) \
104108
--build-arg LD_FLAGS="$$LD_FLAGS" \
105109
--platform linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/riscv64 \
106110
-f docker/Dockerfile .

renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,26 @@
3030
"autoReplaceStringTemplate": "{{{newValue}}}",
3131
"datasourceTemplate": "docker",
3232
"versioningTemplate": "docker"
33+
},
34+
{
35+
"customType": "regex",
36+
"fileMatch": [
37+
"^go.mod$"
38+
],
39+
"depTypeTemplate": "language",
40+
"matchStrings": [
41+
"^toolchain go(?<currentValue>[0-9.]+)"
42+
],
43+
"extractVersionTemplate": "^(?<version>.+)-linux-amd64$",
44+
"depNameTemplate": "docker.io/gotify/build",
45+
"autoReplaceStringTemplate": "{{{newValue}}}",
46+
"datasourceTemplate": "docker",
47+
"versioningTemplate": "docker"
3348
}
3449
],
50+
"ignoreDeps": [
51+
"go"
52+
],
3553
"packageRules": [
3654
{
3755
"matchManagers": [

0 commit comments

Comments
 (0)