summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-08-28 11:50:54 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-08-28 11:50:54 +0200
commitd24485c812c8a28899327a4e444d80e8a1df0042 (patch)
tree563514620432dfe44c5780a7f20150c2affd4ff3 /Makefile
parent86345015be92f4ead57e98b7afee7779c827ee0c (diff)
downloadalpine-mksite-d24485c812c8a28899327a4e444d80e8a1df0042.tar.bz2
alpine-mksite-d24485c812c8a28899327a4e444d80e8a1df0042.tar.xz
make: import latest release info
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5265ecd..d45190c 100644
--- a/Makefile
+++ b/Makefile
@@ -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