Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maykonn/f3937d87257bd2a12e398aea80dbf4c8 to your computer and use it in GitHub Desktop.
Save Maykonn/f3937d87257bd2a12e398aea80dbf4c8 to your computer and use it in GitHub Desktop.
# @author Maykonn Welington Candido <maykonn@outlook.com>
# For docker-compose for instance you may do it in order to install the latest version on UNIX:
REPO_PATH=docker/compose
ARTIFACT_NAME=docker-compose-$(uname -s)-$(uname -m)
DOCKER_COMPOSE_VERSION=$(curl --silent "https://api.github.com/repos/$REPO_PATH/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
sudo curl -L "https://github.com/$REPO_PATH/releases/download/$DOCKER_COMPOSE_VERSION/$ARTIFACT_NAME" -o /usr/local/bin/docker-compose
# Change the REPO_PATH value by the desired repository path
# Change the ARTIFACT_NAME value by the name of the downloadable artifact, you can see the name on the repository release page
# For docker-compose again, you can see it on: https://github.com/docker/compose/releases/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment