X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=make_tree_file;h=75614f6bb80595c39b1944d1ca14e4f84f2985f0;hb=HEAD;hp=195fb2c640984e584ffb2641e2bda5af67c8e150;hpb=9fbf57b33a2dc0bbc677fc0387d759348a33ca85;p=next-scripts diff --git a/make_tree_file b/make_tree_file index 195fb2c..75614f6 100755 --- a/make_tree_file +++ b/make_tree_file @@ -9,20 +9,12 @@ h=$(date '+%k') exit 1 } -# allow kisskb to use more of ka2 -ssh $build_host /usr/local/bin/set-kisskb-jfactor 48 - -eval $(gpg-agent --daemon --enable-ssh-support) -ssh-add ~/.ssh/ra.kernel.org - -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') -l="$(git describe --match "v*" --abbrev=0)" +l=$(git tag -l --sort=taggerdate 'v*' | tail -n 1) n="next-$d" mkdir Next @@ -38,8 +30,9 @@ mkdir Next IFS=' ' grep -v '^#' $CTRL_FILE | while read email type name url ref build; do + [ "$type" = "branch" ] && continue tab="\t" - [ ${#name} -le 8 ] && tab="\t\t" + [ ${#name} -lt 8 ] && tab="\t\t" [ "$type" = "git" ] && url="$url#${ref##*:}" printf "%s$tab%s\t%s\n" $name $type $url done @@ -47,32 +40,30 @@ mkdir Next mv ../SHA1s Next/SHA1s -for i in quilt-import.log merge.log; do - grep -v '^Checking out files:' ../$i >Next/$i -done +grep -v '^Checking out files:' ../merge.log >Next/merge.log printf -- "-next-%s\n" $d >localversion-next git add Next localversion-next git commit -s -v -a -m "Add linux-next specific files for $d" -git tag -u 41D5C07A -m "$n" "$n" +git tag -u $gpg_key -m "$n" "$n" git branch -f stable refs/remotes/origin/master p="patch-$l-$n" git diff-tree -p "$l.." >"../$p" -gpg2 -u 41D5C07A -a -b "../$p" +gpg -u $kup_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 @@ -83,8 +74,8 @@ 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" -ssh-agent -k +ssh -O exit git@gitolite.kernel.org exit 0