pgit.sh, make: Fetch tags in get and pull targets
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m25s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m41s
CI / Packaging test (pull_request) Successful in 0s

Fetch tags with all get and pull targets:

- pgit.sh cmd_get(): add --tags to the top-level fetch, which serves the
  get- and git-get- targets of the topdir and the projects-dir Makefiles
- topdir.mk git-get-pub: add --tags to the pub fetch
- projects-dir.mk git-pull-all: pass --tags to the per-project git pull
  --all
- rules.mk update: pass --tags to git pull
- pkg.sh check_scm(): pass --tags to git pull so the release flow sees the
  release tags of the remote

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-11-11 16:34:54 +01:00
commit c4769cf79f
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
5 changed files with 5 additions and 5 deletions

View file

@ -353,7 +353,7 @@ git-get-mini: $(SSH_WRAPPER_SH)
PGIT_SH_PROJECTS="$(patsubst %/.git,%,$(wildcard $(addsuffix /.git,$(shell make -s build-order))))" $(PGIT_SH_GET_DEFAULT)
git-pull-all: $(SSH_WRAPPER_SH)
$(PGIT_SH) pull $(PGIT_SH_OPTS_NETWORK) --all
$(PGIT_SH) pull $(PGIT_SH_OPTS_NETWORK) --all --tags
git-get-maintainer: $(SSH_WRAPPER_SH)
PGIT_SH_PROJECTS="$(PROJECTS_WITH_PROJECT_CONF)" $(PGIT_SH) exec make $@

View file

@ -119,7 +119,7 @@ love:
@echo "Not war?"
cvsupdate update:
if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull && git submodule update --init --recursive || exit 1; fi
if [ -d "CVS" ]; then cvs update -dP || exit 1; else git pull --tags && git submodule update --init --recursive || exit 1; fi
cvsdiff diff:
if [ -d "CVS" ]; then cvs diff -u || exit 1; else git --no-pager diff --relative --no-prefix . || exit 1; fi

View file

@ -280,7 +280,7 @@ git-get-maintainer:
git-get-pub:
set -e; if git remote | grep -q "^pub$$"; then \
git fetch --prune --recurse-submodules=on-demand pub master ;\
git fetch --prune --tags --recurse-submodules=on-demand pub master ;\
git submodule foreach --recursive 'git fetch --tags -f pub' ;\
git rebase --autostash pub/master ;\
git merge --ff-only pub/master ;\

View file

@ -263,7 +263,7 @@ cmd_get()
run_git -C $project_dir remote add $remote_name $pull_url
[ "$from_user" = "$remote_user" ] || run_git -C $project_dir remote set-url --push $remote_name no_push
}
run_git -C $project_dir fetch --prune --recurse-submodules=on-demand $remote_name $from_ref
run_git -C $project_dir fetch --prune --tags --recurse-submodules=on-demand $remote_name $from_ref
run_git -C $project_dir submodule foreach --recursive 'git fetch --tags -f origin'
if [ "$to_ref" ]; then
run_git -C $project_dir rebase --autostash $remote_name/$from_ref $to_ref

View file

@ -130,7 +130,7 @@ check_scm()
{
if [ -d .git ]; then
log + checking git
git pull --no-edit || fatal "git pull failed, giving up"
git pull --no-edit --tags || fatal "git pull failed, giving up"
git submodule update --init --recursive || fatal "git submodule update failed, giving up"
git status --porcelain | grep -v '^??' | grep -q . && {
git status