Commit 722667f4 authored by lucperkins's avatar lucperkins

Create vendored Ruby setup

Signed-off-by: 's avatarlucperkins <lucperkins@gmail.com>
parent d45b735f
...@@ -11,7 +11,11 @@ tmp/ ...@@ -11,7 +11,11 @@ tmp/
# Crash Log # Crash Log
crash.log crash.log
# OS X file # macOS artifacts
static/.DS_Store .DS_Store
prometheus_rsa prometheus_rsa
# Ruby artifacts
.bundle/
vendor/
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 DOWNLOADS := prometheus alertmanager blackbox_exporter consul_exporter graphite_exporter haproxy_exporter memcached_exporter mysqld_exporter node_exporter pushgateway statsd_exporter
build: clean downloads compile build: clean downloads compile
bundle:
bundle config build.nokogiri --use-system-libraries
bundle install --path vendor
clean: clean:
rm -rf output downloads repositories rm -rf output downloads repositories
compile: compile:
bundle exec nanoc $(NANOC)
downloads: $(DOWNLOADS:%=downloads/%/repo.json) $(DOWNLOADS:%=downloads/%/releases.json) downloads: $(DOWNLOADS:%=downloads/%/repo.json) $(DOWNLOADS:%=downloads/%/releases.json)
...@@ -20,4 +26,10 @@ downloads/%/releases.json: ...@@ -20,4 +26,10 @@ downloads/%/releases.json:
@echo "curl -sf -H 'Accept: application/vnd.github.v3+json' <GITHUB_AUTHENTICATION> https://api.github.com/repos/prometheus/$*/releases > $@" @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 > $@ @curl -sf -H 'Accept: application/vnd.github.v3+json' $(GITHUB_AUTHENTICATION) https://api.github.com/repos/prometheus/$*/releases > $@
.PHONY: build compile deploy guard:
$(GUARD)
serve:
$(NANOC) view
.PHONY: build bundle clean compile downloads serve
...@@ -15,12 +15,12 @@ As a guideline, please keep the documentation generally applicable and avoid use ...@@ -15,12 +15,12 @@ As a guideline, please keep the documentation generally applicable and avoid use
## Prerequisites ## Prerequisites
You need to have a working Ruby environment set up and then install the You need to have a working Ruby environment set up (including [bundler](https://bundler.io/))
necessary gems: and then install the necessary gems:
```bash ```bash
cd docs cd docs
bundle make bundle
``` ```
## Building ## Building
...@@ -39,9 +39,9 @@ To run a local server that displays the generated site, run: ...@@ -39,9 +39,9 @@ To run a local server that displays the generated site, run:
```bash ```bash
# Rebuild the site whenever relevant files change: # Rebuild the site whenever relevant files change:
bundle exec guard make guard
# Start the local development server: # Start the local development server in a separate shell:
bundle exec nanoc view make serve
``` ```
You should now be able to view the generated site at You should now be able to view the generated site at
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment