normalizeZip now uses specified timestamp, since git will not propagate VERSION file timestamp during git clone

This commit is contained in:
knaccc
2019-06-30 06:45:35 +01:00
parent 421590dee6
commit ac054f8d51
7 changed files with 22 additions and 30 deletions
+16
View File
@@ -46,3 +46,19 @@ if [ $OS = "Darwin" ]; then
else
export JAVA_HOME=$JAVA_HOME_LINUX
fi
# get the SHA-256 hash of the specified file
getHash () {
if [ $(uname -s) = Darwin ]; then
h=`shasum -a 256 $1 | awk '{print $1}'`
else
h=`sha256sum $1 | awk '{print $1}'`
fi
echo $h
}
# normalizes the specified jar or zip for reproducible build. Enforces consistent zip file order and sets all timestamps to midnight on Jan 1 2019
normalizeZip () {
$JAVA_HOME/bin/java --module-path "$basedir/import/commons-compress-1.18/commons-compress-1.18.jar":"$basedir/target/org.getmonero.util.normalizeZip.jar" \
-m org.getmonero.util.normalizeZip 1546300800000 "$1"
}