use make without arguments for local and remote build
This commit is contained in:
parent
9b93adbb4b
commit
1826de7102
2 changed files with 17 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -15,4 +15,5 @@ blog.sublime-project
|
||||||
blog.sublime-workspace
|
blog.sublime-workspace
|
||||||
ssl/
|
ssl/
|
||||||
.python-version
|
.python-version
|
||||||
poetry.toml
|
poetry.toml
|
||||||
|
.local
|
19
Makefile
19
Makefile
|
@ -1,12 +1,23 @@
|
||||||
site:
|
# Makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# if a file .local exists run site locally
|
||||||
|
ifeq ($(wildcard .local),)
|
||||||
|
TARGET = site_remote
|
||||||
|
else
|
||||||
|
TARGET = site_local
|
||||||
|
endif
|
||||||
|
|
||||||
|
site: $(TARGET)
|
||||||
|
echo $(TARGET)
|
||||||
|
|
||||||
|
site_remote:
|
||||||
git pull
|
git pull
|
||||||
makesite
|
makesite
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
||||||
site_local:
|
site_local:
|
||||||
./makesite.py --params params-local.json
|
./makesite.py --params params-local.json
|
||||||
|
|
||||||
serve: site_local
|
|
||||||
cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server
|
cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server
|
||||||
|
|
||||||
dock: site_local
|
dock: site_local
|
||||||
|
|
Loading…
Add table
Reference in a new issue