gh: Improve creating of Releases #477

Closed
mislav opened this Issue Feb 5, 2014 · 6 comments

Comments

Projects
None yet
3 participants
Member

mislav commented Feb 5, 2014

Right now, it's not possible to hub release create without the assets flag or a releases/TAG directory.

For projects that just want to publish release notes, it would be great if we lifted this restriction.

Also, I feel that the releases/TAG default behavior is too arbitrary. We don't know how people will be packaging their software, so I don't think it's useful to have any kind of hardcoded default. I'd rather have separate flags to allow explicit upload of a single file vs. contents of an entire directory.

Note that GitHub web UI doesn't use the term "assets", but refers to them as "binares" which you can "attach". So if we want to be explicit:

hub release create --attach pkg/my-v1.0.zip
hub release create --attach-dir pkg/v1.0/

/cc @jingweno

Contributor

calavera commented Feb 5, 2014

We don't really need two flags, we can detect if the value for --attach is a file or a directory.

I guess it sounds reasonable to not have a default attached directory for people that don't want to upload anything, although the default path is not completely random, the path in github for a release is releases/tag/foo.

Member

mislav commented Feb 5, 2014

Sure, we can detect a directory. I'm just worried that a misspelled file name could result in accidentally uploading a whole directory of super secret source files that you never wanted to upload.

That's my case against the default directory as well. There's a risk of somebody not being aware of that and uploading stuff they didn't want.

Contributor

calavera commented Feb 5, 2014

That's my case against the default directory as well. There's a risk of somebody not being aware of that and uploading stuff they didn't want.

I guess I count with people to read how to use a command before using it :trollface:

Member

mislav commented Feb 5, 2014

Sure. It's just not very unixy. We don't have any other command that reads anything from your disk without you explicitly asking it. Just something to keep in mind.

Collaborator

jingweno commented Feb 7, 2014

I'm up for one --attach flag to detect file or directory. Having one --attach will reduce the number of flags. From the implementation point of view, file and dir are the same thing. For other unix commands, file and dir are treated the same if the command is designed to work with both, e.g., ls.

I'm also up for having no default value since a release may not have any attachment.

mislav added the feature label Dec 24, 2014

Collaborator

jingweno commented Dec 25, 2014

Closing due to #740. We'll add the cukes in a sec

jingweno closed this Dec 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment