-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 682 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PACKAGES := writ
VERSION_FILE := lib/writ/version.rb
DEPS := ${GEM_HOME}/installed
VERSION := $(shell sed -ne '/.*VERSION *= *"\(.*\)".*/s//\1/p' <$(VERSION_FILE))
GEMS := $(addprefix pkg/, $(addsuffix -$(VERSION).gem, $(PACKAGES)))
export RUBYLIB := $(RUBYLIB):test:lib
all: test $(GEMS)
test: $(DEPS)
cutest -r ./test/helper.rb ./test/**/*_test.rb
clean:
rm pkg/*.gem
release: $(GEMS)
for gem in $^; do gem push $$gem; done
pkg/%-$(VERSION).gem: %.gemspec $(VERSION_FILE) | pkg
gem build $<
mv $(@F) pkg/
$(DEPS): $(GEM_HOME) .gems
which dep &>/dev/null || gem install dep
dep install
touch $(GEM_HOME)/installed
pkg:
mkdir -p $@
.PHONY: all test release clean