Strategická: Soubory ke stažení
This commit is contained in:
parent
e4fc5b4a5b
commit
a8b813bbd5
2 changed files with 38 additions and 1 deletions
24
server/bin/build
Executable file
24
server/bin/build
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ueo pipefail
|
||||||
|
|
||||||
|
|
||||||
|
rm static/client static/client.zip -fr
|
||||||
|
mkdir -p static/client
|
||||||
|
|
||||||
|
cp ../klient/client.py static/client
|
||||||
|
cp ../klient/play.py static/client
|
||||||
|
|
||||||
|
(
|
||||||
|
cd static/client
|
||||||
|
zip ../client.zip *
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
cd static/client
|
||||||
|
git init -b master
|
||||||
|
git add .
|
||||||
|
git commit -m "INIT"
|
||||||
|
git update-server-info
|
||||||
|
)
|
||||||
|
ln -sr static/client/.git static/client.git
|
|
@ -228,7 +228,20 @@ def web_index():
|
||||||
for game in games:
|
for game in games:
|
||||||
b.line().p(game_link(game))
|
b.line().p(game_link(game))
|
||||||
else:
|
else:
|
||||||
b.line().p("Přihlaste se, prosím.")
|
b.line().p().b("Přihlaste se, prosím.")
|
||||||
|
|
||||||
|
b.h3("Ke stažení")
|
||||||
|
|
||||||
|
with b.p():
|
||||||
|
b.p("Klient")
|
||||||
|
with b.ul():
|
||||||
|
u = app.url_for('static', filename='client.zip', _external=True)
|
||||||
|
b.line().li("Jako zip: ", b._p(b._a(href=u)(u)))
|
||||||
|
with b.line().li("Jednotlivé soubory:"):
|
||||||
|
u = app.url_for('static', filename='client/client.py', _external=True)
|
||||||
|
v = app.url_for('static', filename='client/play.py', _external=True)
|
||||||
|
b.p(b._a(href=u)(u), b._br(), b._a(href=v)(v))
|
||||||
|
b.line().li("Git: ", b._pre(f"git clone {app.url_for('static', filename='client.git', _external=True)}", _class="margin: 0pt 0pt"))
|
||||||
|
|
||||||
return b.print_file()
|
return b.print_file()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue