https://github.com/quicwg/base-drafts
Raw File
Tip revision: ef4fb0abb47470c41befcf8031334fae485e09a0 authored by Martin Thomson on 23 October 2018, 23:46:14 UTC
Fix line length
Tip revision: ef4fb0a
tag.sh
# Tag files for submission.
#
# You shouldn't need to use this unless you are tagging files for which you are
# not an author.  Use `git tag -a` instead.
#
# This script exists because
# https://trac.tools.ietf.org/tools/ietfdb/ticket/2390 still isn't fixed.

if [[ $# -eq 0 ]]; then
    files=(transport tls recovery http)
else
    files=("$@")
fi

enabled() {
    r="$1"; shift
    for e; do [[ "$e" == "$r" ]] && return 0; done
    return 1
}

declare -A authors=( \
    [transport]=martin.thomson@gmail.com \
    [tls]=martin.thomson@gmail.com \
    [recovery]=ianswett@google.com \
    [http]=mbishop@evequefou.be \
    [invariants]=martin.thomson@gmail.com \
    [qpack]=afrind@fb.com \
    [spin-exp]=ietf@trammell.ch \
)

all=($(make show-next))
tags=()
thisuser=$(git config --get user.name)

for t in "${all[@]}"; do
    r="${t%-[0-9][0-9]}"
    r="${r#draft-ietf-quic-}"
    if enabled "$r" "${files[@]}"; then
        message="Tag for $t created by $thisuser"
        git -c user.email="${authors[$r]}" tag -am "$message" "$t"
	tags+=("$t")
    fi
done
for t in "${tags[@]}"; do
    git push origin "$t"
done
back to top