Submodule update triggers tasks when task.subupdates is set

This commit is contained in:
southerntofu 2020-09-16 14:40:39 +02:00
parent b8820dfd8d
commit 64701a2f25
1 changed files with 17 additions and 0 deletions

View File

@ -204,3 +204,20 @@ function setup_submodule {
[[ "$TIME" = "$NEWTIME" ]]
}
@test "submodule update triggers task when task.subupdates is set" {
setup_submodule
touch $FORGEBUILDDIR/time.subupdates
$FORGEBUILD -b $FORGEBUILDDIR time
[ -f /tmp/forgebuild-time ]
TIME="$(cat /tmp/forgebuild-time)"
cd $SUBMODULE
echo "new stuff" > NEWFILE
git add NEWFILE
git commit -m "second commit"
$FORGEBUILD -b $FORGEBUILDDIR time
NEWTIME="$(cat /tmp/forgebuild-time)"
[[ "$TIME" != "$NEWTIME" ]]
}