forked from pool/grafana
Accepting request 753312 from home:witekbedyk:branches:server:monitoring
- Revert the spec file and make script - Remove PhantomJS dependency OBS-URL: https://build.opensuse.org/request/show/753312 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/grafana?expand=0&rev=28
This commit is contained in:
committed by
Git OBS Bridge
parent
a647090d27
commit
89794e01f3
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
NAME = grafana
|
||||
SPEC = $(NAME).spec
|
||||
|
||||
default: verify-deps clean tar
|
||||
|
||||
verify-deps:
|
||||
@which yarn >/dev/null 2>&1 || ( echo "yarn not found; run \`sudo npm install -g yarn\`" && false )
|
||||
@which grunt >/dev/null 2>&1 || ( echo "grunt not found; run \`sudo npm install -g grunt-cli\`" && false )
|
||||
|
||||
clean:
|
||||
rm -f $(NAME)-*.tar $(NAME)-*.tar.xz
|
||||
|
||||
tar:
|
||||
osc service disabledrun
|
||||
@version=$$( awk '/^Version:/ {print $$2}' $(SPEC) ) && \
|
||||
echo "Package version is $$version" && \
|
||||
basename=$(NAME)-$$version && \
|
||||
tar=$$basename.tar && \
|
||||
tmpdir=$$(mktemp -d -p .) && \
|
||||
cd $$tmpdir && \
|
||||
tar -xf ../$$tar && \
|
||||
cd $$basename && \
|
||||
# exclude the phantomjs-prebuilt binary module from the webpack \
|
||||
sed -i '/phantomjs-prebuilt/d' package.json && \
|
||||
# nuke grunt task for copying phantomjs \
|
||||
rm -f scripts/grunt/options/phantomjs.js && \
|
||||
sed -i '/phantomjs/d' scripts/grunt/*.js && \
|
||||
yarn install --pure-lockfile && \
|
||||
grunt release && \
|
||||
cp -pr tmp/public . && \
|
||||
cp -pr tmp/tools . && \
|
||||
cd .. && \
|
||||
echo "Updating $$basename/tools $$basename/public in tarball..." && \
|
||||
tar -rf ../$$tar $$basename/tools $$basename/public && \
|
||||
# remove go.mod and go.sum as we build exclusively using vendor deps \
|
||||
tar -f ../$$tar --delete $$basename/go.mod $$basename/go.sum && \
|
||||
cd .. && \
|
||||
xz $$tar && \
|
||||
rm -rf $$tmpdir
|
Reference in New Issue
Block a user