Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ help:
@echo "Available targets:"
@echo " install - Install the script to $(LIBEXECDIR), and systemd files"
@echo " uninstall - Remove installed files"
@echo " check - Check for syntax errors in $(SCRIPT_SRC)"
@echo " package - Build both RPM and DEB packages"
@echo " rpm - Build RPM package"
@echo " deb - Build DEB package"
Expand Down Expand Up @@ -67,6 +68,10 @@ uninstall:
rm -rf $(DESTDIR)$(DOCDIR)
@echo "Uninstall complete"

check:
@echo "Running syntax test for $(SCRIPT_SRC)"
bash -n $(SCRIPT_SRC)

# Package building targets
package: rpm deb deb-source

Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ override_dh_auto_build:
# Nothing to build - this is a shell script package

override_dh_auto_test:
# Skip tests for now
$(MAKE) check

override_dh_install:
dh_install
3 changes: 3 additions & 0 deletions prometheus-cvmfs-exporter.spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ make install-systemd DESTDIR=%{buildroot}
# Remove duplicate LICENSE file from doc directory since %license handles it
rm -f %{buildroot}%{_docdir}/%{name}/LICENSE

%check
make check

%post
%systemd_post [email protected]
%systemd_post cvmfs-client-prometheus.socket
Expand Down