Skip to content

Instantly share code, notes, and snippets.

@gabriel-v
Last active September 7, 2018 13:00
Show Gist options
  • Save gabriel-v/29570258d27fe07a7bdaa6b94ccbc1a8 to your computer and use it in GitHub Desktop.
Save gabriel-v/29570258d27fe07a7bdaa6b94ccbc1a8 to your computer and use it in GitHub Desktop.
Script to append to taskcluster/ci/fetch/toolchain.yml from github grcov releases
#!/bin/bash
set -ex
if [ -z $1 ]; then
echo "usage: $0 VERSION"
exit 1
fi
version=$1
echo > toolchain.yml
for archive in grcov-linux-x86_64.tar.bz2 grcov-osx-x86_64.tar.bz2 grcov-win-x86_64.tar.bz2 grcov-win-i686.tar.bz2; do
url="https://github.com/mozilla/grcov/releases/download/v$version/$archive"
rm -f $archive
wget $url
sha256=$(openssl sha256 $archive | cut -f 2 -d ' ')
size=$(cat $archive | wc -c | tr -d ' ')
name=$(basename "$archive" .tar.bz2)
cat >> toolchain.yml <<EOF
$name:
description: grcov binary release
treeherder:
symbol: $name
run:
using: fetch-url
url: $url
sha256: $sha256
size: $size
EOF
rm $archive
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment