51 lines
1.3 KiB
Makefile
51 lines
1.3 KiB
Makefile
default: project-name
|
|
@just --list
|
|
|
|
project-name:
|
|
@echo "iiogama.0x212.com Website"
|
|
|
|
draft:
|
|
bash -c './bin/blog.sh draft'
|
|
|
|
edit:
|
|
bash -c './bin/blog.sh edit'
|
|
|
|
post:
|
|
bash -c './bin/blog.sh post'
|
|
|
|
build: build-blog build-photos
|
|
|
|
build-blog:
|
|
bash -c './bin/blog.sh build'
|
|
|
|
build-photos:
|
|
cd ./photos/; bash -c '../bin/gallery.sh -t "Photos" -d "__thumbs"'
|
|
|
|
serve: build
|
|
bash -c './bin/serve.sh -d ./_output/'
|
|
|
|
push: push-blog push-photos push-assets
|
|
git add .; git commit -m "$(date +%Y%m%d%H%M%S) push"; git push
|
|
|
|
push-blog:
|
|
find ./_output/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
|
|
find ./_output/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
|
|
rsync -avz ./_output/ iiogama-web:/var/www/htdocs/
|
|
#scp -r ./_output/* iiogama:/var/www/htdocs/
|
|
|
|
push-photos:
|
|
find ./photos/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
|
|
find ./photos/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
|
|
rsync -avz ./photos/ iiogama-web:/var/www/htdocs/photos/
|
|
#scp -r ./photos iiogama:/var/www/htdocs/
|
|
|
|
push-assets:
|
|
find ./assets/ -type d -print0 | xargs -0 -I {} chmod 775 "{}"
|
|
find ./assets/ -type f -print0 | xargs -0 -I {} chmod 664 "{}"
|
|
rsync -avz ./assets/ iiogama-web:/var/www/htdocs/
|
|
#scp -r ./assets iiogama:/var/www/htdocs/
|
|
|
|
clean:
|
|
test -d _output/ && rm -rf _output/ || exit 0
|
|
test -d photos/gallery/ && rm -rf photos/gallery/ || exit 0
|