Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change release names so that they can be matched with uname #87

Open
jathek opened this issue Jan 18, 2024 · 0 comments
Open

Change release names so that they can be matched with uname #87

jathek opened this issue Jan 18, 2024 · 0 comments

Comments

@jathek
Copy link

jathek commented Jan 18, 2024

Trying to write a script to check and download scout, and to make it somewhat portable I would like to do this:

SCOUT_REPO_VERSION=$(curl -s https://api.github.com/repos/docker/scout-cli/releases/latest | grep 'tag_name' | cut -d '"' -f4)
curl -L "https://github.com/docker/scout-cli/releases/download/${SCOUT_REPO_VERSION}/docker-scout_${SCOUT_REPO_VERSION}_$(uname -s)_$(uname -m).tar.gz" --create-dirs -o "/tmp/docker-scout/docker-scout.tar.gz"

But the releases aren't named in a way where uname works, so instead I have to do the below, and hardcode the kernel name and the machine hardware name:

SCOUT_REPO_VERSION=$(curl -s https://api.github.com/repos/docker/scout-cli/releases/latest | grep 'tag_name' | cut -d '"' -f4)
curl -L "https://github.com/docker/scout-cli/releases/download/${SCOUT_REPO_VERSION}/docker-scout_${SCOUT_REPO_VERSION/v/}_linux_amd64.tar.gz" --create-dirs -o "/tmp/docker-scout/docker-scout.tar.gz"

As a reference, the way docker/compose publishes releases works pretty well with uname: https://github.com/docker/compose/releases

Tasks

Preview Give feedback
No tasks being tracked yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant