2 archive=$HOME/linux-libre/releases # $(ls -d /media/p0?/linux-libre-releases)
3 key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
4 pubase=public/logs/v5.6-gnu
12 rup=${rel%%-[gl][ni][ub]*}
14 git rev-parse --verify -q incr/v$rel &&
15 git rev-parse --verify -q public/sources/v$rel &&
16 git rev-parse --verify -q public/logs/v$rel &&
19 (if test ! -d $archive/$rel; then
20 echo $archive/$rel/ does not exist >& 2
24 tb=$archive/$rel/linux-libre-$rel &&
28 tagid=$(git rev-parse $tag) &&
29 noteid=$(echo $tagid | sed 's,^..,&/,') &&
30 git rev-parse --verify -q stable/v$rup &&
32 DATE=$(git cat-file -p $tagid |
33 gawk '/^(author|tagger)/ {
34 print strftime(PROCINFO["strftime"], $(NF-1))
36 export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
39 test -f notes/logs/$noteid &&
40 test -f notes/tars/$noteid &&
41 diff -b $tb.log notes/logs/$noteid &&
43 git archive --format tar --prefix=linux-libre-$rel/ $tag |
44 gpg -q --verify notes/tars/$noteid - &&
46 git worktree add --detach log-$rel $pubase &&
50 cp -p $tb.log $tb.tar.sign . &&
51 cp ../notes/tars/$noteid $(basename $tb).git.tar.sign &&
53 git commit --amend --reset-author -S$key -m "GNU Linux-libre $rel logs" &&
56 gpg -q --verify $tar.sign &&
58 git worktree add --detach $tmp/$trd master &&
65 if git status -su | grep .; then
69 git reset --soft stable/v$rup &&
70 git commit -m "GNU Linux-libre $rel incremental" &&
72 git tag -f incr/v$rel &&
74 git fetch file://$(pwd) refs/tags/$tag:refs/tags/public/sources/v$rel
77 git worktree remove $tmp/$trd &&
80 git tag -f -m "GNU Linux-libre $rel logs" -s -u $key public/logs/v$rel &&
82 git worktree remove log-$rel
84 ) || { echo $tag failed >&2; success=false; }