0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2025-09-28 01:29:03 +03:00

chore: make build_{deb,rpm,tarball}.sh reproducible

This commit is contained in:
2025-06-28 14:23:28 +03:00
parent 0feb831865
commit a92a97f8a3
4 changed files with 20 additions and 4 deletions

View File

@@ -2,6 +2,8 @@
set -e
export SOURCE_DATE_EPOCH=1700000000
usage() {
echo "Usage: $(basename "$0") [-h] [-a <x64|armv7l|arm64|all> default=x64]"
echo
@@ -46,7 +48,12 @@ build_tarball(){
sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "${app_dir}/usr/bin/yandex-music"
cd "${app_dir}"
tar -czf "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" *
find . -print0 | LC_ALL=C sort -z | tar --null --files-from=- \
--owner=0 --group=0 --numeric-owner \
--mtime="@${SOURCE_DATE_EPOCH}" \
-cf - | gzip -n > "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz"
cd "${INITIAL_DIR}"
}