-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 2.55 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
.DEFAULT_GOAL := help
SHELL := /bin/bash
help: ## This help panel.
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
printf "%-30s %s\n" "DevOps console for Project helmut-hoffer-von-ankershoffen/about-me-stream" ; \
printf "%-30s %s\n" "=========================================================================" ; \
printf "%-30s %s\n" "" ; \
printf "%-30s %s\n" "Target" "Help" ; \
printf "%-30s %s\n" "------" "----" ; \
for help_line in $${help_lines[@]}; do \
IFS=$$':' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf '\033[36m'; \
printf "%-30s %s" $$help_command ; \
printf '\033[0m'; \
printf "%s\n" $$help_info; \
done
%: # thanks to chakrit
@: # thanks to Wi.lliam Pursell
requirements: ## Install requirements on workstation
workflow/requirements/macOS/bootstrap
source ~/.bash_profile && rbenv install --skip-existing 2.5.5
source ~/.bash_profile && ansible-galaxy install -r workflow/requirements/macOS/ansible/requirements.yml
ansible-playbook -i "localhost," workflow/requirements/generic/ansible/playbook.yml --tags "hosts" --ask-become-pass
source ~/.bash_profile && ansible-playbook -i "localhost," workflow/requirements/macOS/ansible/playbook.yml --ask-become-pass
rbenv rehash
bundle install
requirements-hosts: ## Update /etc/hosts on workstation
ansible-playbook -i "localhost," workflow/requirements/generic/ansible/playbook.yml --tags "hosts" --ask-become-pass
requirements-packages: ## Install packages on workstation
ansible-playbook -i "localhost," workflow/requirements/macOS/ansible/playbook.yml --ask-become-pass
requirements-bundle: ## Install bundle requirements on workstation
rbenv rehash
bundle install
requirements-bundle-update: ## Update bundles - use when make publish signals strange errors
rbenv rehash
bundle update
bundle install
serve: ## Serve on workstation
bundle exec jekyll serve
open: ## Open on workstation
python -mwebbrowser http://127.0.0.1:4000/
build: glossary ## Build _site
JEKYLL_ENV="production" bundle exec jekyll build --verbose --trace
index: ## Index content with Algolia
# JEKYLL_ENV="production" ALGOLIA_API_KEY="$(shell sed '1q;d' .algolia.token)" bundle exec jekyll algolia
publish: index ## Index content with Algolia, build, publish to gh-pages branch on GitHub and cross-publish to Medium
JEKYLL_ENV="production" jgd