]> git.ozlabs.org Git - next-scripts/commitdiff
make_tree_file: manage the kept tags locally
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 15 Apr 2016 00:10:02 +0000 (10:10 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 15 Apr 2016 00:10:02 +0000 (10:10 +1000)
so push to kernel.org with --prune to manage the remote ones

make_tree_file

index a9cc15b3d00c64af65cd10a6e16ece1cdf28c5ae..a1c433f4dd0e649db7b39eaa80ba3d89813c0890 100755 (executable)
@@ -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