Skip to content

Instantly share code, notes, and snippets.

@maretekent
Created December 19, 2018 20:35
Show Gist options
  • Save maretekent/f85e43d7566e75c829eeaae4807d1a0f to your computer and use it in GitHub Desktop.
Save maretekent/f85e43d7566e75c829eeaae4807d1a0f to your computer and use it in GitHub Desktop.
Used in CI
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
CARGO_WEB_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/koute/cargo-web/releases/latest)
CARGO_WEB_VERSION=$(echo $CARGO_WEB_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/$CARGO_WEB_VERSION/cargo-web-x86_64-unknown-linux-gnu.gz"
echo "Downloading cargo-web from: $CARGO_WEB_URL"
curl -L $CARGO_WEB_URL | gzip -d > cargo-web
chmod +x cargo-web
mkdir -p ~/.cargo/bin
mv cargo-web ~/.cargo/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment