]> git.ozlabs.org Git - next-scripts/blobdiff - make_tree_file
make_tree_file: use session 2fa
[next-scripts] / make_tree_file
index a9cc15b3d00c64af65cd10a6e16ece1cdf28c5ae..fe0b75c16b53a9c1348d59cab80c29d639308a66 100755 (executable)
@@ -9,17 +9,8 @@ h=$(date '+%k')
        exit 1
 }
 
-# allow kisskb to use more of ka2
-#ssh $build_host /usr/local/bin/set-kisskb-jfactor 48
-
-trap "ssh-add -d $ssh_key_file" EXIT
-
-ssh-add $ssh_key_file || exit 1
-
-if ! ssh git@gitolite.kernel.org 2fa isval; then
-       read -r -p "Yubikey token: " tok
-       ssh git@gitolite.kernel.org 2fa val $tok
-fi
+read -r -p "Yubikey token: " tok
+ssh git@gitolite.kernel.org 2fa val-session $tok
 
 # This means I get the right tag if I finish after midnight
 d=$(date --date "5 hours ago" '+%Y%m%d')
@@ -67,13 +58,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
@@ -84,6 +75,6 @@ git push history
 echo Pushing patch to kernel.org ...
 cd ..
 xz -v -9 "$p"
-kup --host=kup.kernel.org put "$p.xz" "$p.asc" "/pub/linux/kernel/next/$p.gz"
+kup put "$p.xz" "$p.asc" "/pub/linux/kernel/next/$p.gz"
 
 exit 0