forked from ipfs-inactive/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (28 loc) · 776 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local="http://localhost:8080/ipfs/"
gway="http://gateway.ipfs.io/ipfs/"
build: node_modules
./build.js
node_modules: package.json
npm install
touch node_modules
clean:
rm -rf build
publish:
ipfs add -r -q build | tail -n1 >versions/current
cat versions/current >>versions/history
@export hash=`cat versions/current`; \
export ipfshash=`ipfs ls $$hash | grep ipfs.io | cut -d ' ' -f 1`; \
echo "here are the links:"; \
echo $(local)$$hash; \
echo $(gway)$$hash; \
echo ""; \
echo "now must:"; \
echo "- seed websites: /ipfs/$$hash"; \
echo "- add to ipfs.io: $$ipfshash"; \
publish-to-github:
./publish-to-github
# this assumes blog is a sibling.
update-blog:
@rm -rf blog
cp -r ../blog/build blog
.PHONY: build clean publish publish-to-github