-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: prevent translation changes being merged without the correct configurations #19964
base: develop
Are you sure you want to change the base?
Conversation
spartacus
|
Project |
spartacus
|
Branch Review |
feature/cxspa-9258
|
Run status |
|
Run duration | 11m 56s |
Commit |
|
Committer | Radhep Sabapathipillai |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
3
|
|
2
|
|
0
|
|
125
|
Upgrade your plan to view test results. | |
View all changes introduced in this branch ↗︎ |
ci-scripts/validate-translations.sh
Outdated
# Find all translation folders in the repository | ||
translation_paths=$(find . -type d -path '*/assets/translations') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While running the script on local (where having /dist
folder with already built libs), I've got a failure of the script:
Translations file not found: ./dist/organization/account-summary/assets/translations/translations.ts
# Find all translation folders in the repository | |
translation_paths=$(find . -type d -path '*/assets/translations') | |
# Find all translation folders in the repository, excluding node_modules/ and dist/ | |
translation_paths=$(find . -type d -path '*/assets/translations' -not -path './node_modules/*' -not -path './dist/*') | |
`` |
changed_files=$(git diff --name-only $BASE_COMMIT $HEAD_COMMIT | grep 'assets/translations') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we account only for the pattern assets/translations
, but it can be also assets/src/translations
(with src
in the middle).
When I removed an expected export
statement or import
statement in files in the folder projects/assets/src/translations/
- the script didn't complain, but it should.
We need take it into account:
- in line 32
- in line 37
- in file
ci-scripts/validate-translations.sh
in line 56
closes: https://jira.tools.sap/browse/CXSPA-9258