2e8fdcd8f1
We currently just call sassc, but don't check its return value. That means as long as sassc is available, the script (and therefore the newly added dist CI job) will succeed. Make sure we fail on failure. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1974>
20 lines
524 B
Python
20 lines
524 B
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
from pathlib import PurePath
|
|
import subprocess
|
|
|
|
stylesheets = [
|
|
'data/theme/gnome-shell-high-contrast.css',
|
|
'data/theme/gnome-shell.css'
|
|
]
|
|
|
|
sourceroot = os.environ.get('MESON_SOURCE_ROOT')
|
|
distroot = os.environ.get('MESON_DIST_ROOT')
|
|
|
|
for stylesheet in stylesheets:
|
|
stylesheet_path = PurePath(stylesheet)
|
|
src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss'))
|
|
dst = PurePath(distroot, stylesheet_path)
|
|
subprocess.run(['sassc', '-a', src, dst], check=True)
|