Created
March 2, 2017 13:42
-
-
Save johnscancella/4b27b5f0b5a8446d0664b918b040f63c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=0.9.0 | |
PACKAGE_VERSION=2 | |
all: clean rpm | |
clean: | |
rm -rf *.rpm build/ dist/ *.egg-info/ | |
rpm: | |
curl --fail -LO https://github.com/prometheus/mysqld_exporter/releases/download/v${VERSION}/mysqld_exporter-${VERSION}.linux-amd64.tar.gz | |
tar -xf mysqld_exporter-${VERSION}.linux-amd64.tar.gz --strip-components=1 mysqld_exporter-${VERSION}.linux-amd64/mysqld_exporter | |
fpm -s dir -t rpm -n prometheus-mysqld-exporter -v ${VERSION} --iteration ${PACKAGE_VERSION} --before-install rpm-pre-install --after-install rpm-post-install --rpm-dist el6 mysqld_exporter=/usr/bin/prometheus_mysqld_exporter upstart/prometheus_mysqld_exporter.conf=/etc/init/prometheus_mysqld_exporter.conf | |
fpm -s dir -t rpm -n prometheus-mysqld-exporter -v ${VERSION} --iteration ${PACKAGE_VERSION} --before-install rpm-pre-install --after-install rpm-post-install --rpm-dist el7 mysqld_exporter=/usr/bin/prometheus_mysqld_exporter prometheus_mysqld_exporter.service=/etc/init/prometheus_mysqld_exporter.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment