Repository navigation
Replies: 3 comments 3 replies
|
@exekutive Hello! I think that it is depend on tag name. Name of archive is |
|
I tested this against a couple of public repos with
So the practical convention is close to: But if your script needs something reliable, I still would not build too much logic around the extracted directory name. The safer pattern is:
gh release view --repo OWNER/REPO --json tagName
gh release download --repo OWNER/REPO <tag> --archive=zip --output source.zipThat way your script does not have to guess the archive filename or the unpacked folder name. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm writing a shell script to download github repo releases using the gh CLI, unarchive them, and then change to the enclosed source directory.
The zip that gets downloaded always has a directory containing the files, but the name of that directory doesn't appear to be consistent to me. Is there a naming convention for this directory, or some way to predict it, or determine its name using gh commands?
For example the directory for jubalh/nudoku becomes
nudoku-5.0.0and the directory for doctorfree/ninvaders is
ninvaders-1.0.0r1All reactions