mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
pgit.sh: Run git fetch --tags on submodules
On pull / clone operations, run git submodule foreach --recursive 'git fetch --tags' Notably the Bootstrap package needs the tags to check out different Bootstrap versions. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
490601c9db
commit
3af712705d
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
###!/bin/sh
|
||||||
|
|
||||||
log()
|
log()
|
||||||
{
|
{
|
||||||
|
|
@ -168,6 +168,7 @@ clone()
|
||||||
if [ "$fromuser" = "$login" ]; then
|
if [ "$fromuser" = "$login" ]; then
|
||||||
if [ -d $p ]; then
|
if [ -d $p ]; then
|
||||||
run_git -C $p pull --recurse-submodules=on-demand
|
run_git -C $p pull --recurse-submodules=on-demand
|
||||||
|
run_git -C $p submodule foreach --recursive 'git fetch --tags -f'
|
||||||
else
|
else
|
||||||
run_clone $remote_base/$fromuser$remote_subpath/$p $p
|
run_clone $remote_base/$fromuser$remote_subpath/$p $p
|
||||||
fi
|
fi
|
||||||
|
|
@ -179,6 +180,7 @@ clone()
|
||||||
run_git -C $p remote set-url --push $remotename no_push
|
run_git -C $p remote set-url --push $remotename no_push
|
||||||
}
|
}
|
||||||
run_git -C $p fetch --prune --recurse-submodules=on-demand $remotename $fromref
|
run_git -C $p fetch --prune --recurse-submodules=on-demand $remotename $fromref
|
||||||
|
run_git -C $p submodule foreach --recursive 'git fetch --tags -f'
|
||||||
if [ "$toref" ]; then
|
if [ "$toref" ]; then
|
||||||
run_git -C $p merge --ff-only $remotename/$fromref $toref
|
run_git -C $p merge --ff-only $remotename/$fromref $toref
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue