Github download release with package name in tar file
Set it up so one can run it without preface of sudo and included a check of current version vs installed first and then proceed on new release.
One could do this as a daily cron job and one would always be running the latest release if that was the goal. Another improvement would be the check the system architecture and install the correct one not just the amd Thanks to blockloop for the jq hint.
Here's what I came up with checks for binary with linux-amd64 in the name :. Note that "latest release" will only work if the release is not tagged as a "draft" or "prerelease". Thanks TaChao. Heh, this was bugging me how tricky it was to do as well. Hope it's handy! Thanks josh! However, these automagic "releases" will not appear via the API. JedMeister I can confirm this. Sad, but true. There are two possible things here: a Release doesn't contain a release asset but only the automatically generated one by GitHub tarball, zipball b Release contains a release asset which contains the version in the filename again e.
For those that may have missed it above, josh from GitHub released an official fix for this:. This works perfectly for me. This works perfectly! I've tried providing Basic and Token as an auth header and keep getting a Would love to use this though!! Here's a version that uses python to parse the JSON, in case you don't have jq available like working with tools installed by default on macOS :.
This is all too weak you guys. Those releases that don't appear are not less releases than the others :. Thus I have created lastversion CLI tool. Will give you the version of latest release even if it's not present in the API response! For anyone who don't bother installing extra dependencies or crafting multi-line commands, try my handy service g et la test re lease :. I didn't even notice until today. Expanding on evandrix 's answer.
It aims to be the reverse operation of ghr CLI tool. More improvements can be done of course. Let me know what you think! If you really wanted to expand this, you could use positional parameters for the asset type. This isn't necessary anymore as Github has a direct link to the latest release:. Evidlo - Did you actually try following that? It only works if you do it manually.
This entire thread is about automating the problem. Yes, it works for me. Of course it doesn't work if the asset name changes between releases, so I guess it's not useful for Pandoc. What I mean by manually, is that you can still do this by following the steps on the page you provided, but only manually through the GUI and clicking the link to the file to download it. How to handle cases where the latest release is for an older version e. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. How to download the Release tar file from Github? Ask Question. Asked 5 years, 4 months ago. Active 5 years, 4 months ago.
Viewed 2k times. Use this field only to specify filenames other than tarball or zipball, if any. About Github action to download release assets from private or public repositories Topics ci-cd release-automation github-actions.
MIT License. Releases 3 v1. Aug 29, Packages 0 No packages published. Multiple URLs can be separated by spaces. An alternative would be to use a tmpfs 5 as your work directory. There are a few more settings which can be found in the pkgmk. A detailed guideline is described in Pkgfile 5 manual page. A package source is a directory containing the files needed for building a package using pkgmk 8.
This means that this directory at least has the files Pkgfile which is the package build description and. It is important to understand that the actual source code for the package is not necessarily present in package source directory. Instead the Pkgfile contains an URL which points to a location where the source can be downloaded. The use of the words "package source" in this context is borrowed from the NetBSD world, where a package refers to a set of files and building instructions that describe what's necessary to build a certain piece of software.
The term Packages Sources Repository refers to a remote repository containing packages sources. There are two different layer of packages sources. This collection contains packages sources required to create a basic system, on the basis of which you can build your installation. The official rootfs images are built on the basis of this collection. To obtains the source at first time, use git clone.
Under each of these directories you will find packages sources. You can simply browse around in the directory structure to find out which packages sources are available. Pay attention to the LINT. SH file. It is needed for maintenance: it will check all Pkgfiles in this collection to make sure that the packages in this collection do not depend on packages in extra collection.
You can also use pkgman 1 with command list and option --all to list all local packages sources. If you are looking for a specific package source, it might be easier to use search command instead of list grep :. To find out if the packages sources structure carries packages that are different likely newer compared to the versions currently installed you can use pkgman-diff 1.
If versions differences are found, the output could look like this:. The option --deps calculates the new dependencies for available packages. The option --full shows the table above, not just the list of packages.
Pay attention to trinity-extra-theme package. The available package has the lower version than installed. If no version differences were found, i. Note that the recommended way is to use pkgman-install 8. Here we will only describe the steps to better understand the build process.
Once you have found a package that you want to build and install you simply go into the desired package source directory and use pkgmk 8 to build it. The -d option means download missing source files and tells pkgmk 8 to download the source s specified in Pkgfile in case the source are already downloaded this option is ignored.
When the download is completed the package will be built. If you will build packages with non-root privileges, the installed files will have user permissions. This is wrong, both in terms of security and distribution of these packages. It is better to use fakeroot 1 , to run pkgmk 8 in an environment faking root privileges. The pkgman 1 already uses it by default in zeppelin installation.
If the package was built successfully you can use pkgadd 1 to install or upgrade it. This is already done in default zeppe-lin installation. The following describes how to achieve this, so that you now how it is done in zeppe-lin. This will create the user pkgmk and the group with the same name as the user. If you keep using your computer while compiling packages you will notice that your box is much less responsive as usual. This is caused by having two groups of processes with the same nice priority: your usual running tasks on one side, and pkgman 1 and its child processes on other.
Now, if you could renice pkgman 1 and its children to a higher nice i. Add the postfix M for megabytes, or G for gigabytes. Example: 16G. By default, zeppe-lin already has this option. Below is described how this was done in zeppe-lin. We will control the package build flags through the env-variable.