Created
September 12, 2016 19:33
-
-
Save atdt/e34a75bee67184ce3c7e6514624b389b to your computer and use it in GitHub Desktop.
Diff JavaScript (or any other type of file) across two production branches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
file_pattern='*.js' # Which files to consider | |
v1="php-1.28.0-wmf.18" # Base branch | |
v2="php-1.28.0-wmf.17" # Target branch | |
while IFS= read -r a; do | |
b="${a/$v1/$v2}" | |
diff -u "$a" "$b" # Change '-u' to '-q' if you only want | |
# to list which files have changed. | |
done < <(find "/srv/mediawiki/${v1}" -name "$file_pattern") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment