From 2800cb9a643a128abaf95bab018e16c341b52547 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 6 Oct 2015 21:58:44 +0200 Subject: [PATCH] MacOS build: support for creating pre-build DMGs --- build/macos/build.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/build/macos/build.sh b/build/macos/build.sh index d195e1e0d..2ca2c9d6f 100755 --- a/build/macos/build.sh +++ b/build/macos/build.sh @@ -332,10 +332,24 @@ EOF } } - rm -f ${CMPL}/MKVToolNix-${MTX_VER}.dmg - hdiutil create -srcfolder ${dmgbase} -volname MKVToolNix-${MTX_VER} \ + volumename=MKVToolNix-${MTX_VER} + if [[ $DMG_PRE == 1 ]]; then + local build_number_file=$HOME/net/home/prog/video/mingw/src/uc/build-number + local build=$(< $build_number_file) + let build=$build+1 + echo $build > $build_number_file + + volumename=MKVToolnix-${MTX_VER}-build$(date '+%Y%m%d')-${build}-$(git rev-parse --short HEAD) + fi + + dmgname=${CMPL}/MKVToolNix-${MTX_VER}.dmg + dmgbuildname=${CMPL}/${volumename}.dmg + + rm -f ${dmgname} ${dmgbuildname} + hdiutil create -srcfolder ${dmgbase} -volname ${volumename} \ -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDZO -imagekey zlib-level=9 \ ${CMPL}/MKVToolNix-${MTX_VER} + if [[ ${dmgname} != ${dmgbuildname} ]] mv ${dmgname} ${dmgbuildname} } if [[ -z $@ ]]; then