Ensure submodule updates are performed on first clone

This commit is contained in:
southerntofu 2020-11-25 18:36:14 +01:00
parent 63745cdf54
commit f7c41dfd0c
1 changed files with 11 additions and 0 deletions

View File

@ -218,6 +218,17 @@ function setup_submodule {
[ -f /tmp/forgebuild-time ]
}
@test "submodule is updated on first clone is subupdates is enabled" {
setup_submodule
cd $SUBMODULE
echo "SUBUPDATE" > README
git add README
git commit -m "update commit"
touch $FORGEBUILDDIR/time.subupdates
$FORGEBUILD -b $FORGEBUILDDIR time
[[ "$(cat $FORGEBUILDDIR/.time/sub/README)" = "SUBUPDATE" ]]
}
@test "submodule update does not trigger task by default" {
setup_submodule
$FORGEBUILD -b $FORGEBUILDDIR time