mirror of
https://github.com/prometheus/docs.git
synced 2026-02-06 09:44:54 +01:00
So far every prometheus/alertmanater/... release branch had to be manually configured in the nanoc.yaml config file. With this change the most recent release branches will be checked out automatically if a corresponding semver tag exists. As the Prometheus git repository includes several hundreds of megabytes of vendored assets, the repository is cloned bare and all blobs are filtered by default. Each version is then checked out in an individual working tree and git's spare-chekcout feature is used to reduce the checkout to the `docs/` folder. The git data is cached in `tmp/repo_docs/` and will be recreated automatically if removed. Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
NANOC = bundle exec nanoc
|
|
GUARD = bundle exec guard
|
|
DOWNLOADS := prometheus alertmanager blackbox_exporter consul_exporter graphite_exporter haproxy_exporter memcached_exporter mysqld_exporter node_exporter pushgateway statsd_exporter
|
|
|
|
build: clean downloads compile
|
|
|
|
bundle:
|
|
bundle config build.nokogiri --use-system-libraries
|
|
bundle install --path vendor
|
|
|
|
clean:
|
|
rm -rf output downloads
|
|
|
|
compile:
|
|
$(NANOC)
|
|
|
|
downloads: $(DOWNLOADS:%=downloads/%/repo.json) $(DOWNLOADS:%=downloads/%/releases.json)
|
|
|
|
downloads/%/repo.json:
|
|
@mkdir -p $(dir $@)
|
|
@echo "curl -sf -H 'Accept: application/vnd.github.v3+json' <GITHUB_AUTHENTICATION> https://api.github.com/repos/prometheus/$* > $@"
|
|
@curl -sf -H 'Accept: application/vnd.github.v3+json' $(GITHUB_AUTHENTICATION) https://api.github.com/repos/prometheus/$* > $@
|
|
|
|
downloads/%/releases.json:
|
|
@mkdir -p $(dir $@)
|
|
@echo "curl -sf -H 'Accept: application/vnd.github.v3+json' <GITHUB_AUTHENTICATION> https://api.github.com/repos/prometheus/$*/releases > $@"
|
|
@curl -sf -H 'Accept: application/vnd.github.v3+json' $(GITHUB_AUTHENTICATION) https://api.github.com/repos/prometheus/$*/releases > $@
|
|
|
|
guard:
|
|
$(GUARD)
|
|
|
|
serve:
|
|
$(NANOC) view
|
|
|
|
.PHONY: build bundle clean compile downloads serve
|