diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-28 11:50:54 +0200 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-08-28 11:50:54 +0200 |
| commit | d24485c812c8a28899327a4e444d80e8a1df0042 (patch) | |
| tree | 563514620432dfe44c5780a7f20150c2affd4ff3 /Makefile | |
| parent | 86345015be92f4ead57e98b7afee7779c827ee0c (diff) | |
| download | alpine-mksite-d24485c812c8a28899327a4e444d80e8a1df0042.tar.bz2 alpine-mksite-d24485c812c8a28899327a4e444d80e8a1df0042.tar.xz | |
make: import latest release info
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -8,9 +8,9 @@ static_out := $(patsubst _static/%,$(out)/%,$(static_sources)) all: $(pages) $(static_out) -$(out)/%.html: %.md _layout.template.html +$(out)/%.html: %.md _layout.template.html release.yaml mkdir -p $(dir $@) - lua _scripts/generate_page.lua $< > $@ + lua _scripts/generate_page.lua $< release.yaml > $@ $(static_out): $(out)/%: _static/% mkdir -p $(dir $@) @@ -18,3 +18,17 @@ $(static_out): $(out)/%: _static/% clean: rm -f $(pages) $(static_out) + +yaml_url := http://nl.alpinelinux.org/alpine/latest-stable/releases/x86_64/latest-releases.yaml + +latest-releases.yaml: + curl -J $(yaml_url) > $@.tmp + mv $@.tmp $@ + +release.yaml: latest-releases.yaml + lua -e 'y=require("yaml"); for _,v in pairs(y.load(io.read("*a"))) do if v.flavor == "alpine" then io.write(y.dump(v)) end end' > $@.tmp < $< + mv $@.tmp $@ + +update-release: + rm -f latest-releases.yaml + $(MAKE) release.yaml |
