From 70ecc1746ccc2eb20a9045189e5c4bb7c823968c Mon Sep 17 00:00:00 2001 From: MayconVM Date: Tue, 3 Nov 2026 14:52:53 -0300 Subject: [PATCH] fix(makefile): read release version from CHANGELOG heading The old pattern 'grep -om1 "v[0-9].*"' matched the first vN.N.N anywhere in the file, so any mention of a module pseudo-version above the release heading silently corrupted the build version (e.g. it produced "v0.0.0-20261102152715-54038813c47f`." as main.version). Anchor it to the ## vX.Y.Z heading instead. --- CHANGELOG.md | 10 +++++----- Makefile | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3763c42..35a4df4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,11 @@ ## Não lançado ### 🔧 Correções -- **whatsmeow atualizado para 2026-11-02** — a versão fixada em 0.7.2 - (`v0.0.0-20260630180629`) ficou 125 dias atrás do upstream. O WhatsApp subiu a - versão mínima de cliente nesse intervalo e passou a recusar a conexão com - **405 client outdated**, impedindo pareamento e reconexão das instâncias. - Agora em `v0.0.0-20261102152715-54038813c47f`. +- **whatsmeow atualizado para 2026-11-02** — a versão fixada na 0.7.2 + (commit `b572e5bcb92b`, de 30/06/2026) ficou 125 dias atrás do upstream. O + WhatsApp subiu a versão mínima de cliente nesse intervalo e passou a recusar a + conexão com **405 client outdated**, impedindo pareamento e reconexão das + instâncias. Agora em `v0.0.0-20261102152715-54038813c47f`. - **Go 1.26** — o whatsmeow novo exige `go >= 1.26.0`; o `Dockerfile` passou a usar `golang:1.26.10-alpine` no estágio de build. - **Ajustes de API do whatsmeow** — `UpdateBlocklist` e `GetBlocklist` agora diff --git a/Makefile b/Makefile index 1134d2d..677ea2d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ APP_NAME=evolution-go MAIN_PATH=cmd/evolution-go/main.go BUILD_DIR=build GO=go -VERSION=$(shell grep -om1 "v[0-9].*" CHANGELOG.md) +VERSION=$(shell sed -n 's/^## \(v[0-9][^ ]*\).*/\1/p' CHANGELOG.md | head -1) LDFLAGS=-ldflags "-X main.version=$(VERSION)" GOFLAGS=-v