Fix #3001 website update 'latest' links on publish
authorisaacs <i@izs.me>
Sat, 24 Mar 2012 08:39:39 +0000 (01:39 -0700)
committerisaacs <i@izs.me>
Sat, 24 Mar 2012 08:39:39 +0000 (01:39 -0700)
Makefile

index 77f4ce2ac57a5f063e2d4cad952e5c4087207ed3..737f49ae5a9be645db7ee2f03215689646dcbbdb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -126,6 +126,13 @@ out/doc/%:
 
 website-upload: doc
        rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/
+       ssh node@nodejs.org '\
+    rm -f ~/web/nodejs.org/dist/latest &&\
+    ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\
+    rm -f ~/web/nodejs.org/docs/latest &&\
+    ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\
+    rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\
+    ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz'
 
 docopen: out/doc/api/all.html
        -google-chrome out/doc/api/all.html