[Webkit-unassigned] [Bug 175279] [Tools] Add script to download a GitHub release

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 17 13:35:45 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=175279

--- Comment #9 from Ross Kirsling <ross.kirsling at sony.com> ---
(In reply to Alexey Proskuryakov from comment #8)
> I'm not an expert either. My only comment is about usability - with a
> somewhat generic name, the tool should probably better explain what it does.
> It's too easy to assume that it gets the source code for the latest Gtk
> release or something like that. Maybe some example invocations would help.

This script can be used to download any binary asset included in the latest release of a GitHub repo to an arbitrary output directory, so it actually *is* extremely generic. I can certainly add a docblock with example usage though.

> Also, if it's actually downloading something, it should be called
> "download", not "get" I think.

Can do.

> > Tools/Scripts/get-latest-github-release.py:39
> > +    parser.add_argument('--output', '-o', default='.', help='output directory')
> 
> It is a little annoying that curl's "-o" option has a different meaning, but
> I don't have a proposal for how to improve this.

This is the same sort of "-o" as GCC though.

> > Tools/Scripts/get-latest-github-release.py:40
> > +    parser.add_argument('--endpoint', '-e', default=PUBLIC_GITHUB_API_ENDPOINT, help='GitHub API endpoint (defaults to public)')
> 
> Do you envision a need to use a different endpoint? Will the users of the
> tool know how to make this choice?
> 
> > Tools/Scripts/get-latest-github-release.py:41
> > +    parser.add_argument('--token', '-t', default=None, help='GitHub API OAuth token (where applicable)')
> 
> Again, will the users know if it's applicable?

These ensure that the script is able to target private repositories or private GitHub (Enterprise) instances. Whether or not these options are used upstream, they are necessary for completeness.

> > Tools/Scripts/get-latest-github-release.py:42
> > +    parser.add_argument('--force', '-f', action='store_true', help='download latest release even if it already exists')
> 
> Exists where? Will this overwrite an existing file with the same name? Why
> is this option needed?

The need is explained in the thread above (i.e. "downloads are time-consuming so avoid doing so unnecessarily by default"), but we can be explicit about it existing "in the specified output directory".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170817/29b8c84c/attachment.html>


More information about the webkit-unassigned mailing list