Replies: 2 comments 3 replies
-
|
@exekutive Hello! I think that it is depend on tag name. Name of archive is |
Beta Was this translation helpful? Give feedback.
-
|
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. |
Beta Was this translation helpful? Give feedback.
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.0r1Beta Was this translation helpful? Give feedback.
All reactions