0
0
Форкнуть 0

add makefile to build and install files

This adds a makefile to build and install the files. This can be used
for an easier deployment on the page.
Этот коммит содержится в:
Gibheer 2015-11-17 20:48:58 +01:00
родитель 3fb205aba6
Коммит b38f447af7
2 изменённых файлов: 52 добавлений и 0 удалений

26
Makefile Обычный файл
Просмотреть файл

@ -0,0 +1,26 @@
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
.PHONY: clean install
all: clean build
build:
hugo
clean:
-rm -r public/*
install: build
cp -r public/ $(HTTPDIR)/
find $(HTTPDIR) ! -path $(HTTPDIR) -type d -exec chmod $(DIRMODE) {} +
find $(HTTPDIR) ! -path $(HTTPDIR) -type f -exec chmod $(FILEMODE) {} +
chown -R $(OWNER):$(GROUP) $(HTTPDIR)/

Просмотреть файл

@ -24,3 +24,29 @@ documentation
The documentation on the markdown format can be found on the [blackfriday](https://github.com/russross/blackfriday)
project page.
building and installation
-------------------------
To build and install the website, use the following commands:
```
make clean install
```
The website is built automatically into the *public/* directory.
You can also add a number of variables, to modify the installation process.
```
# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
```