-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (42 loc) · 1.67 KB
/
Makefile
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
53
54
.PHONY: setup setup_github clean docs docs_view demo test lint build install push_rubygems push_github
SHELL:=/bin/bash
# Assumes `gem install bundler`
setup:
bundle install
setup_github:
gem install keycutter
clean:
bundle exec rake clean
bundle exec rake clobber
rm -f dependabot-linguist-*.gem
rm -f pkg/dependabot-linguist-*.gem
docs: clean
bundle exec rake rdoc
# http://localhost:8080/
docs_view: docs
ruby -run -e httpd doc
demo:
bundle exec ruby demo_script.rb
# default (just `rake`) is spec + rubocop, but be pedantic in case this changes.
test: clean
bundle exec rake spec
lint: clean
bundle exec rake rubocop
# We can choose from `gem build dependabot-linguist.gemspec` or `bundle exec rake build`.
# The gem build command creates a ./dependabot-linguist-$VER.gem file, and the rake build
# (within bundle context) creates a ./pkg/dependabot-linguist-$VER.gem file.
build: test lint
bundle exec rake build
# --user-install means no need for sudo or expectation of
# changing the folder permissions or access but will need
# "gem environment"'s "USER INSTALLATION DIRECTORY" (+ "/bin")
# in the PATH to then use any gem executables that it may contain.
install: build
gem install ./pkg/dependabot-linguist-$$(grep lib/dependabot/linguist/version.rb -e "VERSION" | cut -d \" -f 2).gem --user-install
# Will be run with one "pkg/dependabot-linguist-*.gem" file
# rubygems_api_key and the rubygems host are the default
push_rubygems:
gem push $$(find . | grep pkg/dependabot-linguist-*.gem)
# Will be run with one "pkg/dependabot-linguist-*.gem" file
push_github:
gem push --key github --host https://rubygems.pkg.github.com/Skenvy $$(find . | grep pkg/dependabot-linguist-*.gem)