From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Ken Moffat" <zarniwhoop@ntlworld.com>,
"Vicent Martí" <tanoku@gmail.com>,
"Stefan Näwe" <stefan.naewe@atlas-elektronik.com>,
"Javier Domingo Cansino" <javierdo1@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [ANNOUNCE] Git v1.9-rc0
Date: Mon, 27 Jan 2014 14:56:28 -0800 [thread overview]
Message-ID: <xmqqy521m3tv.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140124233635.GA31371@sigill.intra.peff.net> (Jeff King's message of "Fri, 24 Jan 2014 18:36:36 -0500")
Jeff King <peff@peff.net> writes:
> On Thu, Jan 23, 2014 at 10:15:33AM -0800, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>>
>> > Junio, since you prepare such tarballs[1] anyway for kernel.org, it
>> > might be worth uploading them to the "Releases" page of git/git. I
>> > imagine there is a programmatic way to do so via GitHub's API, but I
>> > don't know offhand. I can look into it if you are interested.
>>
>> I already have a script that takes the three tarballs and uploads
>> them to two places, so adding GitHub as the third destination should
>> be a natural and welcome way to automate it.
>
> I came up with the script below, which you can use like:
>
> ./script v1.8.2.3 git-1.8.2.3.tar.gz
>
> It expects the tag to already be pushed up to GitHub. I'll leave
> sticking it on the "todo" branch and integrating it into RelUpload to
> you. This can also be used to backfill the old releases (though I looked
> on k.org and it seems to have only partial coverage).
>
> It sets the "prerelease" flag for -rc releases, but I did not otherwise
> fill in any fields, including the summary and description. GitHub seems
> to display reasonably if they are not set.
Thanks.
> -- >8 --
> #!/bin/sh
> #
> # usage: $0 <tag> <tarball>
>
> repo=git/git
>
> # replace this with however you store your oauth token
> # if you don't have one, make one here:
> # https://github.com/settings/tokens/new
> token() {
> pass -n github.web.oauth
Hmph, what is this "pass" thing?
> }
>
> post() {
> curl -H "Authorization: token $(token)" "$@"
> }
>
> # usage: create <tag-name>
> create() {
> case "$1" in
> *-rc*)
> prerelease=true
> ;;
> *)
> prerelease=false
> ;;
> esac
>
> post -d '
> {
> "tag_name": "'"$1"'",
> "prerelease": '"$prerelease"'
> }' "https://api.github.com/repos/$repo/releases"
> }
>
> # use: upload <release-id> <filename>
> upload() {
> url="https://uploads.github.com/repos/$repo/releases/$1/assets" &&
> url="$url?name=$(basename $2)" &&
> post -H "Content-Type: $(file -b --mime-type "$2")" \
> --data-binary "@$2" \
> "$url"
> }
>
> # This is a hack. If you don't mind a dependency on
> # perl's JSON (or another parser), we can do a lot better.
> extract_id() {
> perl -lne '/"id":\s*(\d+)/ or next; print $1; exit 0'
> }
>
> create "$1" >release.json &&
> id=$(extract_id <release.json) &&
> upload "$id" "$2" >/dev/null &&
> rm -f release.json
next prev parent reply other threads:[~2014-01-27 22:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <xmqq61pjzljn.fsf@gitster.dls.corp.google.com>
2014-01-21 22:14 ` [ANNOUNCE] Git v1.9-rc0 Junio C Hamano
2014-01-22 12:53 ` Javier Domingo Cansino
2014-01-22 15:42 ` Junio C Hamano
2014-01-22 15:49 ` Stefan Näwe
2014-01-22 16:11 ` Junio C Hamano
2014-01-22 17:26 ` Vicent Martí
2014-01-22 18:10 ` Junio C Hamano
2014-01-22 20:30 ` Ken Moffat
2014-01-22 21:04 ` Junio C Hamano
2014-01-22 23:11 ` Ken Moffat
2014-01-23 2:09 ` Jeff King
2014-01-23 18:15 ` Junio C Hamano
2014-01-24 23:36 ` Jeff King
2014-01-27 22:56 ` Junio C Hamano [this message]
2014-01-28 0:04 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy521m3tv.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=javierdo1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peff@peff.net \
--cc=stefan.naewe@atlas-elektronik.com \
--cc=tanoku@gmail.com \
--cc=zarniwhoop@ntlworld.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox