-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (48 loc) · 1.65 KB
/
Copy pathMakefile
File metadata and controls
60 lines (48 loc) · 1.65 KB
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
BRANCH := $(shell git branch --show-current 2>/dev/null || echo "unknown")
REMOTES := $(shell git remote 2>/dev/null || echo "")
.DEFAULT_GOAL := help
.PHONY: help build apt rpm index jekyll-build jekyll-serve clean serve push push-lease
help:
@echo "Options:"
@echo
@echo " make build -> Build package repositories and Jekyll site into public/"
@echo " make apt -> Build only the APT repository"
@echo " make rpm -> Build only the RPM repository"
@echo " make index -> Generate directory index.html files"
@echo " make jekyll-build -> Build only the Jekyll site"
@echo " make jekyll-serve -> Serve Jekyll locally"
@echo " make serve -> Alias for make jekyll-serve"
@echo " make clean -> Remove generated output"
@echo
@echo " make push -> Push the current branch to all remotes"
@echo " make push-lease -> Force-push with lease to all remotes"
build:
@ruby tools/rb/build_all.rb
@$(MAKE) jekyll-build
apt:
@ruby tools/rb/build_apt_repo.rb
rpm:
@ruby tools/rb/build_rpm_repo.rb
index:
@$(MAKE) jekyll-build
jekyll-build:
@ruby tools/rb/generate_directory_pages.rb public _pages
@bundle exec jekyll build
jekyll-serve:
@ruby tools/rb/generate_directory_pages.rb public _pages
@bundle exec jekyll serve --livereload
serve: jekyll-serve
clean:
@rm -rf public
push:
@echo "Push normal -> branch: $(BRANCH)"
@for remote in $(REMOTES); do \
echo " pushing to $$remote..."; \
git push $$remote $(BRANCH); \
done
push-lease:
@echo "Push --force-with-lease -> branch: $(BRANCH)"
@for remote in $(REMOTES); do \
echo " pushing to $$remote..."; \
git push --force-with-lease $$remote $(BRANCH); \
done