File: Makefile

package info (click to toggle)
ruby-et-orbi 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144 kB
  • sloc: ruby: 781; makefile: 35
file content (52 lines) | stat: -rw-r--r-- 1,098 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

## gem tasks ##

NAME != \
  ruby -e "s = eval(File.read(Dir['*.gemspec'][0])); puts s.name"
VERSION != \
  ruby -e "s = eval(File.read(Dir['*.gemspec'][0])); puts s.version"

count_lines:
	find lib -name "*.rb" | xargs cat | ruby -e "p STDIN.readlines.count { |l| l = l.strip; l[0, 1] != '#' && l != '' }"
	find spec -name "*_spec.rb" | xargs cat | ruby -e "p STDIN.readlines.count { |l| l = l.strip; l[0, 1] != '#' && l != '' }"
cl: count_lines

scan:
	scan lib/**/*.rb

gemspec_validate:
	@echo "---"
	ruby -e "s = eval(File.read(Dir['*.gemspec'].first)); p s.validate"
	@echo "---"

name: gemspec_validate
	@echo "$(NAME) $(VERSION)"

cw:
	find lib -name "*.rb" -exec ruby -cw {} \;

build: gemspec_validate
	gem build $(NAME).gemspec
	mkdir -p pkg
	mv $(NAME)-$(VERSION).gem pkg/

push: build
	gem push --otp "$(OTP)" pkg/$(NAME)-$(VERSION).gem

test:
	bundle exec proba
spec: test


## specific to project ##

info:
	uname -a
	bundle exec ruby -v
	bundle exec ruby -Ilib -r et-orbi -e "EtOrbi._make_info"


## done ##

.PHONY: count_lines scan gemspec_validate name cw build push test info