-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
81 lines (49 loc) · 1.39 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Makefile for oauth2_proxy Cookbook.
#
# Author:: Mike Juarez <[email protected]>
# License:: Apache License, Version 2.0
# Source:: https://github.com/orion-cookbooks/oauth2_proxy
#
# Global/env vars:
.DEFAULT_GOAL := install
BUNDLE_CMD ?= ~/.rbenv/shims/bundle
BUNDLE_EXEC ?= bundle exec
KNIFE_CONFIG ?= $(HOME)/.chef/knife.rb
COOKBOOK_NAME ?= pygster
# Target groups:
test: install foodcritic kitchen_test
install: $(BUNDLE_CMD) bundle_install
clean: kitchen_destroy
rm -rf build
release: bump_version git_push_tags berks_upload
# Bundler itself:
$(BUNDLE_CMD):
gem install bundler
bundle_install: $(BUNDLE_CMD)
bundle install
# Post bundler targets:
kitchen_converge:
$(BUNDLE_EXEC) kitchen converge
kitchen_destroy:
$(BUNDLE_EXEC) kitchen destroy
kitchen_verify:
$(BUNDLE_EXEC) kitchen verify
kitchen_test:
$(BUNDLE_EXEC) kitchen test
foodcritic:
$(BUNDLE_EXEC) foodcritic .
bump_version:
$(BUNDLE_EXEC) scmversion bump auto --default patch
berks_install: bundle_install
$(BUNDLE_EXEC) berks install
berks_upload: berks_install
$(BUNDLE_EXEC) berks upload
git_push_tags:
git push origin --tags
# knife targets:
publish: build_path
$(BUNDLE_EXEC) knife cookbook site share $(COOKBOOK_NAME) "Web Servers" -c $(KNIFE_CONFIG) -o build -n
# Work-around for the CI's checkout/workspace path:
build_path:
mkdir -p build
rsync --exclude=build/ -avr . build/$(COOKBOOK_NAME)