From: Stephen Rothwell Date: Fri, 15 Apr 2016 00:10:02 +0000 (+1000) Subject: make_tree_file: manage the kept tags locally X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=335f559282433ef2d905adfae408f022a4929006;p=next-scripts make_tree_file: manage the kept tags locally so push to kernel.org with --prune to manage the remote ones --- diff --git a/make_tree_file b/make_tree_file index a9cc15b..a1c433f 100755 --- a/make_tree_file +++ b/make_tree_file @@ -67,13 +67,13 @@ gpg -u $gpg_key -a -b "../$p" oldest=$(date --date "3 months ago" '+%Y%m%d') echo "Removing old releases ... <= next-$oldest" -old_tags=$(git ls-remote --tags korg 'next-*[0-9]' | +old_tags=$(git tag -l 'next-*[0-9]' | awk -F - '$2 ~ /^[0-9]*$/ && $2 <= '$oldest' { printf("next-%s\n", $2); }') -[ "$old_tags" ] && git push korg --delete $old_tags +[ "$old_tags" ] && git tag -d $old_tags echo Pushing to korg ... -git push korg +git push --prune korg echo Pushing to korg-history ... git push korg-history