From 285d38ca35f364baa06d68104b67fe90f73b97cc Mon Sep 17 00:00:00 2001 From: Dmitri Aleksandrov Date: Mon, 19 Oct 2026 13:49:24 +0300 Subject: [PATCH 1/2] build(goi18n): require the core v0.2.0 The module required the pseudo-version v0.0.0-00010101000000-000000000000 of the core added by go get with the replace; the users can't download it, the replace is ignored for them. --- integrations/goi18n/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/goi18n/go.mod b/integrations/goi18n/go.mod index 584a134..6232b6a 100644 --- a/integrations/goi18n/go.mod +++ b/integrations/goi18n/go.mod @@ -5,7 +5,7 @@ go 1.27 replace github.com/insei/valigo => ../../ require ( - github.com/insei/valigo v0.0.0-00010101000000-000000000000 + github.com/insei/valigo v0.2.0 github.com/nicksnyder/go-i18n/v2 v2.6.1 github.com/stretchr/testify v1.12.1 golang.org/x/text v0.43.0 From 381090d73cb399b829d4f9b32d8af79c7f167fe5 Mon Sep 17 00:00:00 2001 From: Dmitri Aleksandrov Date: Mon, 19 Oct 2026 13:49:24 +0300 Subject: [PATCH 2/2] ci: check that the modules require a released version of the core --- .github/workflows/go.yml | 3 +++ scripts/check-modules.sh | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 scripts/check-modules.sh diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a1b0724..b0f3e84 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -26,6 +26,9 @@ jobs: - name: Lint the core module run: golangci-lint run ./... + - name: Check that the modules require a released core + run: scripts/check-modules.sh + - name: Lint the modules run: | . scripts/modules.sh diff --git a/scripts/check-modules.sh b/scripts/check-modules.sh new file mode 100755 index 0000000..84e06be --- /dev/null +++ b/scripts/check-modules.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Checks that the modules of modules.sh require a released version of the core: the replace of their go.mod +# is ignored by the users, a pseudo-version of the core, v0.0.0-..., can't be downloaded. +set -euo pipefail + +root=$(cd "$(dirname "$0")/.." && pwd) +. "$root/scripts/modules.sh" +failed=0 +for module in $MODULES; do + version=$(cd "$root/$module" && go list -m -f '{{.Version}}' github.com/insei/valigo) + if [[ ! "$version" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "$module requires github.com/insei/valigo $version, a released version expected" >&2 + failed=1 + fi +done +exit $failed