Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion integrations/goi18n/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions scripts/check-modules.sh
Original file line number Diff line number Diff line change
@@ -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
Loading