feat: ci/cd - validate translations
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
This commit is contained in:
parent
09ffc7644a
commit
2802d52372
21
.drone.yml
21
.drone.yml
|
@ -67,6 +67,25 @@ trigger:
|
|||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: translations
|
||||
|
||||
steps:
|
||||
- name: validate
|
||||
image: ubuntu:22.04
|
||||
commands:
|
||||
- apt install jq
|
||||
- make validate-translations
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
|
@ -372,6 +391,6 @@ depends_on:
|
|||
- migrations-manifest
|
||||
---
|
||||
kind: signature
|
||||
hmac: adb6f2a2d07f26eb833ea4cac0f54bb6aea7bc53a38d423afe7408701b270ac2
|
||||
hmac: 8baa6a7cde3870e6638643031cf54044a5b816a0963274db27b9fa44af18df4b
|
||||
|
||||
...
|
||||
|
|
4
Makefile
4
Makefile
|
@ -47,3 +47,7 @@ create-sql-migration: install-goose
|
|||
.PHONY: validate-migrations
|
||||
validate-migrations: install-goose
|
||||
@goose -dir migrations -v validate
|
||||
|
||||
.PHONY: validate-translations
|
||||
validate-translations:
|
||||
@./validate_translations.sh
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
LOCALE_EN_PATH="./internal/discord/internal/discordi18n/locale.en.json"
|
||||
|
||||
status=0
|
||||
|
||||
for path in ./internal/discord/internal/discordi18n/locale.*.json; do
|
||||
if [ "$path" = $LOCALE_EN_PATH ]; then
|
||||
continue
|
||||
fi
|
||||
echo "----- ${path}"
|
||||
if diff <(jq 'keys' $LOCALE_EN_PATH) <(jq 'keys' "$path"); then
|
||||
echo "----- Success"
|
||||
else
|
||||
status=1
|
||||
echo "----- Failed"
|
||||
fi
|
||||
done
|
||||
|
||||
exit "$status"
|
Loading…
Reference in New Issue