19 lines
460 B
Makefile
19 lines
460 B
Makefile
set unstable
|
|
|
|
update:
|
|
#!/usr/bin/env bash
|
|
|
|
if ! git diff --cached --quiet; then \
|
|
echo "Error: there are pre-existing staged changes" && exit 1; \
|
|
fi
|
|
|
|
rsync -rv --delete $HOME/brain/brain/public/ content/
|
|
git add content/
|
|
|
|
git diff --stat
|
|
|
|
if ! git diff --cached --quiet; then \
|
|
export TIMESTAMP=$(date -u +"%Y-W%V-%u %H:%M:%S"); \
|
|
git commit -m "checkpoint: ${TIMESTAMP}"; \
|
|
git push origin main; \
|
|
fi
|