Add more events: precommit & postcommit
This commit is contained in:
parent
2202509d87
commit
814b9a406b
24
ezsync
24
ezsync
|
@ -182,10 +182,34 @@ for OVERLAY in ${MERGED_PORTAGE[*]}; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Execute all 'precommit' enabled modules
|
||||||
|
for MODULE in ${MODULES_PRECOMMIT}; do
|
||||||
|
loadModule ${MODULE} "precommit"
|
||||||
|
RESULT=${?}
|
||||||
|
if [ ${RESULT} -eq 255 ]; then
|
||||||
|
printWarn "Trying to load module: ${MODULE}, that is incompatible with event: precommit!"
|
||||||
|
elif [ ${RESULT} -ne 0 ]; then
|
||||||
|
fail "EzBuild was unable to execute module: ${MODULE}!"
|
||||||
|
fi
|
||||||
|
unloadModule
|
||||||
|
done
|
||||||
|
|
||||||
# Regenerate Portage cache
|
# Regenerate Portage cache
|
||||||
printInfo "Updating constructed Portage cache..."
|
printInfo "Updating constructed Portage cache..."
|
||||||
run "FEATURES="metadata-transfer" PORTDIR="${PORTAGESDIR}/${PORTAGE_BUILD[0]}" egencache --update --portdir=${PORTAGESDIR}/${PORTAGE_BUILD[0]} --jobs=${MAXJOBS} --load-average=${LOADAVERAGE} --tolerant"
|
run "FEATURES="metadata-transfer" PORTDIR="${PORTAGESDIR}/${PORTAGE_BUILD[0]}" egencache --update --portdir=${PORTAGESDIR}/${PORTAGE_BUILD[0]} --jobs=${MAXJOBS} --load-average=${LOADAVERAGE} --tolerant"
|
||||||
[ ${?} -ne 0 ] && die "EzBuild was unable to regenerate cache!"
|
[ ${?} -ne 0 ] && die "EzBuild was unable to regenerate cache!"
|
||||||
|
|
||||||
|
# Execute all 'postcommit' enabled modules
|
||||||
|
for MODULE in ${MODULES_POSTCOMMIT}; do
|
||||||
|
loadModule ${MODULE} "postcommit"
|
||||||
|
RESULT=${?}
|
||||||
|
if [ ${RESULT} -eq 255 ]; then
|
||||||
|
printWarn "Trying to load module: ${MODULE}, that is incompatible with event: postcommit!"
|
||||||
|
elif [ ${RESULT} -ne 0 ]; then
|
||||||
|
fail "EzBuild was unable to execute module: ${MODULE}!"
|
||||||
|
fi
|
||||||
|
unloadModule
|
||||||
|
done
|
||||||
|
|
||||||
# Finally quit the application
|
# Finally quit the application
|
||||||
quit
|
quit
|
||||||
|
|
Loading…
Reference in New Issue