fix(lint): устранить замечания golangci-lint + переход на dockers_v2
Проход lint (52 → 0): - vkauth/token: переименовать затенённый err (govet shadow x3) - udprelay/loop: явный _ = conn.Close() (errcheck x2) - captcha/manual: ReadHeaderTimeout + html.EscapeString (G112, G705) - proxy/tcpfwd: хелпер nonNegUint64 для байтовых счётчиков io.Copy (G115) - proxy/bondclient, wire/bondframe: bounds-проверки на len->uint16/uint32 - wire/srtpmimicry: задокументирована усечка RTP seq mod 2^16 - dnsdial/doh: bounds-проверка + binary.BigEndian.PutUint16 - captcha/slider: clamp luma до 255 перед конверсией uint8 - vkauth/types: обоснованный nolint для публичных учёток VK SDK Новый пакет internal/randx — Intn/IntN/Float64 на crypto/rand, drop-in замена math/rand. Мигрированы все места antifingerprint-jitter (~22) в captcha, slider, namegen, vkauth, udprelay. GoReleaser: - bump GORELEASER_VERSION v2.5.0 → v2.15.4 в Taskfile и обоих CI-workflow; текущий синтаксис .goreleaser.yaml (archives.ids, format_overrides.formats) требует v2.8+ - миграция dockers + docker_manifests → dockers_v2 (единый блок, multi-platform buildx); Dockerfile.goreleaser использует конвенцию ARG TARGETPLATFORM
This commit is contained in:
1 parent
f8bc3f54e5
commit
dd8233208c
20 files changed
+156
-109
No files matched your search
+15
-43
@@ -149,51 +149,23 @@ release:
|
||||
draft: false
|
||||
name_template: "{{ .ProjectName }} {{ .Version }}"
|
||||
|
||||
dockers:
|
||||
- id: server-amd64
|
||||
dockers_v2:
|
||||
- id: server
|
||||
ids:
|
||||
- server
|
||||
image_templates:
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-amd64"
|
||||
dockerfile: Dockerfile.goreleaser
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--label=org.opencontainers.image.source=https://github.com/samosvalishe/btp"
|
||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||
images:
|
||||
- ghcr.io/samosvalishe/btp
|
||||
tags:
|
||||
- "{{ .Version }}"
|
||||
- '{{ if not .Prerelease }}latest{{ end }}'
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
labels:
|
||||
org.opencontainers.image.source: https://github.com/samosvalishe/btp
|
||||
org.opencontainers.image.version: "{{ .Version }}"
|
||||
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
||||
org.opencontainers.image.created: "{{ .Date }}"
|
||||
extra_files:
|
||||
- docker/entrypoint.sh
|
||||
|
||||
- id: server-arm64
|
||||
ids:
|
||||
- server
|
||||
image_templates:
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-arm64"
|
||||
dockerfile: Dockerfile.goreleaser
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm64"
|
||||
- "--label=org.opencontainers.image.source=https://github.com/samosvalishe/btp"
|
||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||
extra_files:
|
||||
- docker/entrypoint.sh
|
||||
|
||||
docker_manifests:
|
||||
- name_template: "ghcr.io/samosvalishe/btp:{{ .Version }}"
|
||||
image_templates:
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-amd64"
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-arm64"
|
||||
|
||||
- name_template: "ghcr.io/samosvalishe/btp:latest"
|
||||
skip_push: "{{ .Prerelease }}"
|
||||
image_templates:
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-amd64"
|
||||
- "ghcr.io/samosvalishe/btp:{{ .Version }}-arm64"
|
||||
Reference in new issue
Block a user