Remove data/_theme.scss from git history

- Remove data/_theme.scss from git history, to prevent accidental overwrites/commits
- Add a step to the configuration wizard to create a blank file if one doesn't exist
- Move the file existence check in compile-scss to before favicon building (as it errors if the file is missing)

Fixes https://todo.sr.ht/~tsileo/microblog.pub/67
test-fix-theme
Cocoa 2022-11-22 20:59:49 -05:00 zatwierdzone przez Thomas Sileo
rodzic 441e3d90b1
commit 3423747f33
3 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -1 +0,0 @@
// override vars for theming here

Wyświetl plik

@ -25,6 +25,10 @@ def _(event):
def main() -> None:
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
print("Welcome to microblog.pub setup wizard\n")
print("Generating key...")
if _KEY_PATH.exists():

Wyświetl plik

@ -46,16 +46,16 @@ def compile_scss(ctx, watch=False):
# type: (Context, bool) -> None
from app.utils.favicon import build_favicon
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
favicon_file = Path("data/favicon.ico")
if not favicon_file.exists():
build_favicon()
else:
shutil.copy2(favicon_file, "app/static/favicon.ico")
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
if watch:
run("boussole watch", echo=True)
else: