This repository has been archived on 2021-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
simpledash/AdvMakefile

31 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

defaultName = "simpledash"
defaultTarget = "build"
def simpledash_build():
# Check if node-sass is installed
if shell.LookPath("node-sass") == -1:
# Warn user if not
log.Warn("node-sass must be installed to build bulma for simpledash")
else:
# Build bulma if node-sass installed
shell.Exec("""
cd bulma
node-sass --output-style compressed --omit-source-map-url sass/custom-styles.scss css/custom-styles.min.css
cp -v css/custom-styles.min.css ../resources/public/css/bulma.min.css
""")
# Check if go is installed
if shell.LookPath("go") == -1:
# Log fatally if not
log.Fatal("go must be installed to compile simpledash")
# Build simpledash
shell.Exec("go build")
def simpledash_run():
# If simpledash binary does not exist
if not file.Exists("simpledash"):
# Log fatally
log.Fatal("simpledash should be built before running, run `advmake` to build")
# Execute simpledash binary
shell.Exec("./simpledash")