kasperpeulen / gist-generator

Create gists from the command line.
MIT License
3 stars 1 forks source link

Removing gist files causes generator to fail #11

Open Sfshaza opened 9 years ago

Sfshaza commented 9 years ago

I've been updating the gist files for the dart-tutorials-samples repo. There are two directories that it's creating gist files but we can't/won't be using those gist files: futures and search_form.

I manually deleted those gist files during a clean-up pass.

But the next time I tried to run the gist generator, I got this:

Skipping count_down: Too many files. Skipping httpserver: Files can only have the name index.html/main.dart/styles.css. Skipping polymer_list: Files can only have the name index.html/main.dart/styles.css. Skipping search_form: Files can only have the name index.html/main.dart/styles.css. Skipping slambook: Too many files. Skipping stopwatch: Too many files. "anagram" gist updated at https://gist.github.com/0532bfcb70bf5e4a900c GitHub Error: Requested Resource was Not Found dart-tutorials-samples [fix-html] $


At this point it bails and doesn't create further gist files.

It seems odd that it would fail when the gist file has been removed. Shouldn't it just regenerate the gist?

To temporarily work around this issue, I've created a faux file in the web directory for those examples so that it will skip due to too many files. But at least it will then continue generating gists.

kasperpeulen commented 9 years ago

Will try to provide a real solution later, but I think a possible workaround would be, to delete the gist reference in pubspec.yaml, it should then create a new gist.

kwalrath commented 9 years ago

@kasperpeulen I thought you were on vacation! But deleting the gist reference in pubspec.yaml wasn't working for Shams; she had to make it an illegal gist (by adding a file with a forbidden name).

kasperpeulen commented 9 years ago

@kwalrath yeah, I found some wifi, but I'm now really back :)

I can not reproduce parto fthis, without a gist field in the pubspec, the gist regenerates for me

but for the error, I think I should make some logic that even with the pubspec gist field, if it isn't found the gist should be regenerated and the gist field updated ?

Sfshaza commented 9 years ago

I just played with it a bit. Here's the flow:

So, you are right, deleting the line from the pubspec is a workaround, but I still end up with new search_form gist files each time I run generate. (They are always new if I remove the gist and the line from the pubspec.)

The only workaround that gets me what I want is to add another file to the web directory with a different name. (Hence the "readme" file that I've added.) I guess this is ok, since the readme file says "ignore me". :)

thx!