forked from html2rss/html2rss-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 1.01 KB
/
Makefile
File metadata and controls
37 lines (30 loc) · 1.01 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
default: lint test
lint:
yamllint lib/html2rss/configs/ .github/
bundle exec rubocop -P -f quiet
yarn exec prettier -- --check lib/**/*.yml .github/**/*.yml
test:
bundle exec rspec
test-fetch-changed-configs:
bin/rspec_changed_configs
test-fetch-all-configs:
bundle exec rspec --tag fetch spec/html2rss/configs
test-all: test test-fetch-all-configs
lintfix:
bundle exec rubocop -a
yarn exec prettier -- --write lib/**/*.yml .github/**/*.yml
config:
@if [ -z "$(domain)" ] || [ -z "$(name)" ]; \
then \
echo "Usage: make config domain=domain.tld name=latest"; \
else \
git stash; \
git checkout master && \
git pull && \
git stash pop; \
git checkout -b "feat/add-$(domain)-$(name)" && \
mkdir -p "lib/html2rss/configs/$(domain)/" && \
mkdir -p "spec/html2rss/configs/$(domain)/" && \
bin/template_gen_config_spec "$(domain)/$(name).yml" > "spec/html2rss/configs/$(domain)/$(name).yml_spec.rb" && \
bin/template_gen_config "$(domain)" "$(name)" > "lib/html2rss/configs/$(domain)/$(name).yml"; \
fi;