blob: 5ebe6f4a480dfd8d87da59c96fb7368aa624153c (
plain) (
blame)
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
26
27
28
29
|
#!/usr/bin/env zsh
set -e
echo "First Build"
make mozaddons
# Zips are unstable with hashes
cd artifacts
ZIPNAME="$(jq -r '.name + "-" + .version + "-unsigned.zip"' ../manifest.json)"
unzip "$ZIPNAME"
rm "$ZIPNAME"
HASH1="$( (find . -type f -print0 | sort -z | xargs -0 sha512sum;
find . \( -type f -o -type d \) -print0 | sort -z | \
xargs -0 stat -c '%n %a') \
| sha512sum)"
cd ..
echo "Got Hash $HASH1"
sleep 1;
echo "Second Build"
make mozaddons
# Zips are unstable with hashes
cd artifacts
unzip "$ZIPNAME"
rm "$ZIPNAME"
HASH2="$( (find . -type f -print0 | sort -z | xargs -0 sha512sum;
find . \( -type f -o -type d \) -print0 | sort -z | \
xargs -0 stat -c '%n %a') \
| sha512sum)"
cd ..
echo "Got Hash $HASH2"
if [[ "$HASH1" != "$HASH2" ]]; then echo -e "\x1b[0;31mNot reproducible!\x1b[0m"; exit 1; else echo -e "\x1b[0;32mReproducible :3\x1b[0m" fi;
|