Skip to content

Instantly share code, notes, and snippets.

@nbrownus
Last active August 29, 2015 13:57
Show Gist options
  • Save nbrownus/9754075 to your computer and use it in GitHub Desktop.
Save nbrownus/9754075 to your computer and use it in GitHub Desktop.
Creates a deb for grafana
# Run this in a path you don't care about, things may get deleted!
VERSION="1.8.1"
BUILD="betable2"
set -e -x
ORIGPWD="$(pwd)"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
curl -LO "http://grafanarel.s3.amazonaws.com/grafana-$VERSION.tar.gz"
tar xf "grafana-$VERSION.tar.gz"
mv "grafana-$VERSION" grafana
rm -f "$ORIGPWD/grafana_${VERSION}-${BUILD}_amd64.deb"
fakeroot fpm -m "Nate Brown <nate@betable.com>" \
-n "grafana" -v "$VERSION-$BUILD" \
-p "$ORIGPWD/grafana_${VERSION}-${BUILD}_amd64.deb" \
--prefix "/usr/local/share" \
-s "dir" -t "deb" "grafana"
@mms-gianni
Copy link

since they are using minified css and js files this wont work anymore. itc better to download and unpack it instead of a checkout.

@nbrownus
Copy link
Author

Yep, ran into the issue today. Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment