feat: "aptpkg-auto-run" trailer for HEAD commit
To build files changed from provided commit hash before HEADmain
parent
64e09d296d
commit
c209761d1e
15
aptpkg
15
aptpkg
|
@ -123,6 +123,21 @@ change_autobuild_pkgs(){
|
||||||
commitid=$1
|
commitid=$1
|
||||||
[ -n "$commitid" ] || commitid=HEAD
|
[ -n "$commitid" ] || commitid=HEAD
|
||||||
|
|
||||||
|
if [[ "$commitid" = HEAD ]]; then
|
||||||
|
before_run=$(git log HEAD^..HEAD | grep aptpkg-auto-run | sed 's#aptpkg-auto-run: ##' | sed 's# ##')
|
||||||
|
|
||||||
|
if [ -n "$before_run" ]; then
|
||||||
|
for m in $before_run; do
|
||||||
|
build_chg_pre=$(git diff-tree --no-commit-id --name-only -r "$m" | grep "build" | sed 's#/build##')
|
||||||
|
echo "Using $m with files $build_chg_pre"
|
||||||
|
|
||||||
|
for a in $build_chg_pre; do
|
||||||
|
aptpkg "$a"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
build_chg=$(git diff-tree --no-commit-id --name-only -r $commitid | grep "build" | sed 's#/build##')
|
build_chg=$(git diff-tree --no-commit-id --name-only -r $commitid | grep "build" | sed 's#/build##')
|
||||||
echo "Using $commitid with files $build_chg"
|
echo "Using $commitid with files $build_chg"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue