mirror of
https://github.com/munki/munki.git
synced 2025-12-30 19:20:10 -06:00
Adjust how overall pkg version is calculated so that the last portion is never higher than any component version's last section
This commit is contained in:
@@ -120,27 +120,28 @@ cd "$MUNKIROOT"
|
||||
GITREV=`git log -n1 --format="%H" -- code/client`
|
||||
GITREVINDEX=`git rev-list --count $GITREV`
|
||||
SVNREV=$(($GITREVINDEX + $MAGICNUMBER))
|
||||
MPKGSVNREV=$SVNREV
|
||||
VERSION=$MUNKIVERS.$SVNREV
|
||||
|
||||
# get a psuedo-svn revision number for the apps pkg
|
||||
APPSGITREV=`git log -n1 --format="%H" -- code/apps`
|
||||
GITREVINDEX=`git rev-list --count $APPSGITREV`
|
||||
APPSSVNREV=$(($GITREVINDEX + $MAGICNUMBER))
|
||||
if [ $APPSSVNREV -gt $MPKGSVNREV ] ; then
|
||||
MPKGSVNREV=$APPSSVNREV
|
||||
fi
|
||||
# get base apps version from MSC.app
|
||||
APPSVERSION=`defaults read "$MUNKIROOT/code/apps/Managed Software Center/Managed Software Center/Managed Software Center-Info" CFBundleShortVersionString`
|
||||
# append the APPSSVNREV
|
||||
APPSVERSION=$APPSVERSION.$APPSSVNREV
|
||||
|
||||
# get a psuedo-svn revision number for the metapackage
|
||||
MPKGGITREV=`git log -n1 --format="%H"`
|
||||
GITREVINDEX=`git rev-list --count $MPKGGITREV`
|
||||
MPKGSVNREV=$(($GITREVINDEX + $MAGICNUMBER))
|
||||
MPKGVERSION=$MUNKIVERS.$MPKGSVNREV
|
||||
|
||||
# get a pseudo-svn revision number for the launchd pkg
|
||||
LAUNCHDGITREV=`git log -n1 --format="%H" -- launchd`
|
||||
GITREVINDEX=`git rev-list --count $LAUNCHDGITREV`
|
||||
LAUNCHDSVNREV=$(($GITREVINDEX + $MAGICNUMBER))
|
||||
if [ $LAUNCHDSVNREV -gt $MPKGSVNREV ] ; then
|
||||
MPKGSVNREV=$LAUNCHDSVNREV
|
||||
fi
|
||||
# Get launchd version if different
|
||||
LAUNCHDVERSION=$MUNKIVERS
|
||||
if [ -e "$MUNKIROOT/launchd/version.plist" ]; then
|
||||
@@ -148,6 +149,10 @@ if [ -e "$MUNKIROOT/launchd/version.plist" ]; then
|
||||
fi
|
||||
LAUNCHDVERSION=$LAUNCHDVERSION.$LAUNCHDSVNREV
|
||||
|
||||
# get a psuedo-svn revision number for the metapackage
|
||||
MPKGVERSION=$MUNKIVERS.$MPKGSVNREV
|
||||
|
||||
|
||||
MPKG="$OUTPUTDIR/munkitools-$MPKGVERSION.pkg"
|
||||
|
||||
if [ $(id -u) -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user