File: checkBuildReproducibility.sh

package info (click to toggle)
junit5 5.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,748 kB
  • sloc: java: 98,014; xml: 1,840; sh: 148; ruby: 111; javascript: 59; makefile: 2
file content (29 lines) | stat: -rwxr-xr-x 601 bytes parent folder | download | duplicates (4)
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
#!/bin/bash -e

rm -rf checksums*

export SOURCE_DATE_EPOCH=$(date +%s)

function calculate_checksums() {
    OUTPUT=$1

    ./gradlew \
        --configuration-cache \
        --no-build-cache \
        -Porg.gradle.java.installations.auto-download=false \
        -Dscan.tag.Reproducibility \
        clean \
        assemble

    find . -name '*.jar' \
        | grep '/build/libs/' \
        | grep --invert-match 'javadoc' \
        | sort \
        | xargs sha256sum > "${OUTPUT}"
}


calculate_checksums checksums-1.txt
calculate_checksums checksums-2.txt

diff checksums-1.txt checksums-2.txt