-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (58 loc) · 1.81 KB
/
Makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
LEKTOR_SERVER_FLAGS=-h 127.0.0.1
# minify javascript assets, compile scss assets
LEKTOR_PLUGIN_FLAGS=-f scss
LEKTOR_DEPLOY_FLAGS=
all: build
.ONESHELL:
install:
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 git-lfs
elif hash pacman 2>/dev/null; then
sudo pacman -Syu imagemagick python-pip glibc lib32-glibc gcc git-lfs --noconfirm
elif hash dnf 2>/dev/null; then
sudo dnf install -y ImageMagick python3-pip gcc git-lfs
else
echo -e "Please install Imagemagick, python3-pip git-lfs and gcc"
fi
pip3 install wheel --user --upgrade
pip3 install lektor --user --upgrade
build:
lektor clean --yes
lektor plugin flush-cache
python3 -m lektor build $(LEKTOR_PLUGIN_FLAGS)
server:
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)
pull:
if git config remote.github.url > /dev/null; then
git pull github master
else
git remote add github [email protected]:c3woc/c3woc-podcast.git
git pull github master
fi
if git config remote.gitea.url > /dev/null; then
git pull gitea master
else
git remote add gitea [email protected]:C3WOC/c3woc-podcast.git
git pull gitea master
fi
git pull origin master
push:
rm .lfsconfig
if git config remote.gitea.url > /dev/null; then
git push gitea master
else
git remote add gitea [email protected]:C3WOC/c3woc-podcast.git
git push gitea master
fi
if git config remote.github.url > /dev/null; then
git push github master
else
git remote add github [email protected]:c3woc/c3woc-podcast.git
git push github master
fi
git restore .lfsconfig