Skip to content
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

Add JS diff to artifacts #104

Closed
emteknetnz opened this issue Feb 14, 2024 · 1 comment
Closed

Add JS diff to artifacts #104

emteknetnz opened this issue Feb 14, 2024 · 1 comment

Comments

@emteknetnz
Copy link
Member

Follow on from silverstripe/silverstripe-admin#1671 (comment)

When a JS diff fails, generate a new file that shows the diff between the two files that are different and copy it to the artifacts director. Will need to checkout or download the original file again.

If the diff isn't too large, also output it to the console for convenience

git diff --word-diff --word-diff-regex=[^;] is one option to generate the diff

May wish to string replace ; with ;\n before doing the diff for the file

@emteknetnz emteknetnz changed the title Create add JS diff to artifacts Add JS diff to artifacts Feb 14, 2024
@emteknetnz
Copy link
Member Author

Probably don't need this any more, the random js diff only happens in 4.13 which is now only is security support mode. Workaround solution is to simply rebuild the bundle until the signature matches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant