20251221162823 push
This commit is contained in:
38
justfile
38
justfile
@@ -1,7 +1,7 @@
|
||||
default: project-name
|
||||
_default: _project-name
|
||||
@just --list
|
||||
|
||||
project-name:
|
||||
_project-name:
|
||||
@echo "iiogama.0x212.com Website"
|
||||
|
||||
draft:
|
||||
@@ -13,37 +13,41 @@ edit:
|
||||
post:
|
||||
bash -c './bin/blog.sh post'
|
||||
|
||||
build: build-blog build-photos
|
||||
clean: _clean-blog _clean-photos
|
||||
|
||||
build-blog:
|
||||
_clean-blog:
|
||||
test -d _output/ && rm -rf _output/ || exit 0
|
||||
|
||||
_clean-photos:
|
||||
test -d photos/_thumbs/ && rm -rf photos/_thumbs/ || exit 0
|
||||
test -f photos/index.html && rm photos/index.html || exit 0
|
||||
test -f photos/style.css && rm photos/style.css || exit 0
|
||||
|
||||
build: _build-blog _build-photos
|
||||
|
||||
_build-blog: _clean-blog
|
||||
bash -c './bin/blog.sh build'
|
||||
|
||||
build-photos:
|
||||
_build-photos: _clean-photos
|
||||
cd ./photos/; bash -c '../bin/gallery.sh -t "Photos" -d "_thumbs"'
|
||||
|
||||
serve:
|
||||
test -d _output && bash -c './bin/serve.sh -d ./_output/' || exit 1
|
||||
|
||||
push: push-blog push-photos push-assets
|
||||
push: _push-blog _push-photos _push-assets
|
||||
git add .; git commit -m "$(date +%Y%m%d%H%M%S) push"; git push
|
||||
|
||||
push-blog:
|
||||
_push-blog: _build-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/
|
||||
|
||||
push-photos:
|
||||
_push-photos: _build-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/
|
||||
|
||||
push-assets:
|
||||
_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/
|
||||
|
||||
clean:
|
||||
test -d _output/ && rm -rf _output/ || exit 0
|
||||
test -d photos/_thumbs/ && rm -rf photos/_thumbs/ || exit 0
|
||||
test -f photos/index.html && rm photos/index.html || exit 0
|
||||
test -f photos/style.css && rm photos/style.css || exit 0
|
||||
serve:
|
||||
test -d _output && bash -c './bin/serve.sh -d ./_output/' || exit 1
|
||||
|
||||
Reference in New Issue
Block a user