podcast-webseite/Makefile

36 lines
1,009 B
Makefile
Raw Normal View History

2019-05-25 21:44:15 +02:00
LEKTOR_SERVER_FLAGS=-h 127.0.0.1
2019-12-02 09:28:57 +01:00
# minify javascript assets, compile scss assets
LEKTOR_PLUGIN_FLAGS=-f scss
LEKTOR_DEPLOY_FLAGS=
2019-05-25 21:44:15 +02:00
all: build
2019-06-20 17:42:28 +02:00
.ONESHELL:
2019-05-25 21:44:15 +02:00
install:
2019-06-20 17:42:28 +02:00
if hash apt-get 2>/dev/null; then
sudo apt-get update -qq >/dev/null && sudo apt-get install -qq apt-utils imagemagick python3-pip python3-setuptools gcc
elif hash pacman 2>/dev/null; then
sudo pacman -Syu imagemagick python-pip glibc lib32-glibc gcc --noconfirm
elif hash dnf 2>/dev/null; then
sudo dnf install -y ImageMagick python3-pip gcc
else
echo -e "Please install Imagemagick, python3-pip and gcc"
fi
2019-12-02 09:28:57 +01:00
pip3 install wheel --user
pip3 install lektor --user
2019-05-25 21:44:15 +02:00
2019-06-20 17:42:28 +02:00
build:
lektor clean --yes
2019-12-02 09:28:57 +01:00
lektor plugin flush-cache
python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS)
2019-05-25 21:44:15 +02:00
server:
2019-12-02 09:28:57 +01:00
python3 -m lektor server $(LEKTOR_SERVER_FLAGS) $(LEKTOR_PLUGIN_FLAGS)
deploy:
lektor clean --yes
lektor plugin flush-cache
lektor build $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS)
lektor deploy $(LEKTOR_PLUGIN_FLAGS) $(LEKTOR_DEPLOY_FLAGS)