diff options
author | Joas Schilling <coding@schilljs.com> | 2019-07-12 15:31:42 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-07-12 15:31:42 +0300 |
commit | 291e909153a292cf835ab8af333d4ec3a67a37fa (patch) | |
tree | 8045d9deca5eabd243ebd4d77ebd1efd9ebb3a0c /check-simplewebrtc-bundle.sh | |
parent | f60246c0176073c18123a5ddabc696d9453ce182 (diff) |
Simplify the diff check and use the same way the server uses it nowerdays
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'check-simplewebrtc-bundle.sh')
-rwxr-xr-x | check-simplewebrtc-bundle.sh | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/check-simplewebrtc-bundle.sh b/check-simplewebrtc-bundle.sh index 0bd68b840..224efd7d4 100755 --- a/check-simplewebrtc-bundle.sh +++ b/check-simplewebrtc-bundle.sh @@ -1,18 +1,9 @@ #!/bin/bash - -cp "js/simplewebrtc/bundled.js" "js/simplewebrtc/bundled.js.back" +set -e # Rebuild the bundled SimpleWebRTC -set -e make bundle-simplewebrtc -echo "Comparing js/simplewebrtc/bundled.js to the commited version" -if ! diff -q "js/simplewebrtc/bundled.js" "js/simplewebrtc/bundled.js.back" &>/dev/null -then - echo "js/simplewebrtc/bundled.js is NOT up-to-date! Please send the proper production build within the pull request" - diff "js/simplewebrtc/bundled.js" "js/simplewebrtc/bundled.js.back" - exit 2 -fi +git status -rm "js/simplewebrtc/bundled.js.back" -echo "SimpleWebRTC bundle is up-to-date" +bash -c "[[ ! \"`git status --porcelain js/simplewebrtc/bundled.js`\" ]] || ( echo 'Uncommitted changes in bundled SimpleWebRTC' && exit 1 )" |