-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile.toml
29 lines (23 loc) · 1.02 KB
/
Makefile.toml
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
# Use cargo-make to run tasks here: https://crates.io/crates/cargo-make
# this task is run from the "deploy" workflow in .github/workflows/deploy
# it builds all browser examples, and assembles them in a deploy-out directory
# together with a simple index.html with links to the individual examples.
[tasks.deploy]
dependencies = [
{ name = "deploy", path = "browser-echo" },
{ name = "deploy", path = "browser-chat" },
]
script = '''
rm -r deploy-out || true
mkdir deploy-out
cat <<EOF > deploy-out/index.html
<!DOCTYPE html>
<html lang="en"><head><title>iroh examples</title></head>
<body><h1>iroh examples</h1><a href="https://github.com/n0-computer/iroh-examples">source code</a><ul>
EOF
cp -r browser-echo/public deploy-out/browser-echo
echo '<li><a href="./browser-echo/index.html">browser-echo</li>' >> deploy-out/index.html
cp -r browser-chat/frontend/dist deploy-out/browser-chat
echo '<li><a href="./browser-chat/index.html">browser-chat</li>' >> deploy-out/index.html
echo '</ul></body></html>' >> deploy-out/index.html
'''