-
Notifications
You must be signed in to change notification settings - Fork 7
/
checkcolorhash.sh
25 lines (20 loc) · 763 Bytes
/
checkcolorhash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
currentJsHash=$(cat colorsjschecksum)
currentScssHash=$(cat colorsscsschecksum)
newJsChecksum="$(sha256sum frontend/src/colors.js | cut -f1 -d' ')"
newScssChecksum="$(sha256sum frontend/src/colors.scss | cut -f1 -d' ')"
if [ "$currentJsHash" != "$newJsChecksum" ]; then
echo 'Error. Javascript hash does not match \n'
echo 'Please run yarn makecolors or yarn docker:makecolors'
echo 'so that your colors are updated in all the right places'
exit 1
fi
echo $currentScssHash
echo $newScssChecksum
if [ "$currentScssHash" != "$newScssChecksum" ]; then
echo 'Error. SCSS hash does not match \n'
echo 'Please run yarn makecolors or yarn docker:makecolors'
echo 'so that your colors are updated in all the right places'
exit 1
fi
exit 0