1
0
mirror of https://github.com/jordansissel/fpm synced 2025-08-23 03:04:34 +02:00
fpm/Makefile
Jordan Sissel 42fae324f7 Start working on some better fpm documentation.
This time is using Sphinx and reST.

To build: `make build`
The docs will appear in docs/_build/html/
2016-11-26 22:49:10 -08:00

55 lines
1018 B
Makefile

GEMSPEC=$(shell ls *.gemspec)
VERSION=$(shell awk -F\" '/VERSION =/ { print $$2 }' lib/fpm/version.rb)
NAME=$(shell awk -F\" '/spec.name/ { print $$2 }' $(GEMSPEC))
GEM=$(NAME)-$(VERSION).gem
.PHONY: test
test:
rm -rf .yardoc
sh notify-failure.sh rspec
.PHONY: testloop
testloop:
while true; do \
$(MAKE) test; \
$(MAKE) wait-for-changes; \
done
.PHONY: serve-coverage
serve-coverage:
cd coverage; python -mSimpleHTTPServer
.PHONY: wait-for-changes
wait-for-changes:
-inotifywait --exclude '\.swp' -e modify $$(find $(DIRS) -name '*.rb'; find $(DIRS) -type d)
.PHONY: package
package: | $(GEM)
.PHONY: gem
gem: $(GEM)
$(GEM):
gem build $(GEMSPEC)
.PHONY: test-package
test-package: $(GEM)
# Sometimes 'gem build' makes a faulty gem.
gem unpack $(GEM)
rm -rf ftw-$(VERSION)/
.PHONY: publish
publish: test-package
gem push $(GEM)
.PHONY: install
install: $(GEM)
gem install $(GEM)
.PHONY:
clean:
rm -rf package-*/ *.rpm *.deb *.gz *.tar *.gem .yardoc/
publish-docs:
$(MAKE) -C docs publish