forked from metabrainz/acousticbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfabfile.py
More file actions
25 lines (19 loc) · 749 Bytes
/
fabfile.py
File metadata and controls
25 lines (19 loc) · 749 Bytes
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
from __future__ import with_statement
from fabric.api import local
from fabric.colors import green
from acousticbrainz import create_app, cache
def compile_styling():
"""Compile styles.less into styles.css.
This command requires Less (CSS pre-processor). More information about it can be
found at http://lesscss.org/.
"""
style_path = "static/css/"
local("lessc --clean-css %sstyles.less > %sstyles.css" % (style_path, style_path))
print(green("Style sheets have been compiled successfully.", bold=True))
def clear_memcached():
with create_app().app_context():
cache.flush_all()
print(green("Flushed everything from memcached.", bold=True))
def deploy():
compile_styling()
clear_memcached()