Tidy and organize Makefile

No features added.
This commit is contained in:
Andrew Stryker 2024-01-09 17:00:48 -08:00
parent 0841debef3
commit 8a692c80bd
1 changed files with 28 additions and 4 deletions

View File

@ -1,18 +1,40 @@
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#
# Manage website building
#
# Andrew Stryker <axs@sdf.org>
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#-----------------------------------------------------------------------------#
#
# Configuration
#
#-----------------------------------------------------------------------------#
DEST ?= axs@sdf.org:html DEST ?= axs@sdf.org:html
SITE_URL ?= https://axs.sdf.org SITE_URL ?= https://axs.sdf.org
.PHONY: default help publish #-----------------------------------------------------------------------------#
#
# Define user interface
#
#-----------------------------------------------------------------------------#
.PHONY: default help publish build
default: build
build: #> build: #>
@echo "\t 🏗️ Building site" @echo "🏗️ Building site"
@# We call hugo with two options: @# We call hugo with two options:
@# --cleanDestinationDir, to remove deleted files @# --cleanDestinationDir, to remove deleted files
@# --minify, to compress files my removing extra whitespace @# --minify, to compress files my removing extra whitespace
hugo --cleanDestinationDir --minify hugo --cleanDestinationDir --minify
@echo "✓ Building complete"
publish: build #> Publish site publish: build #> Publish site
@echo "Publishing..." @echo "📰Publishing..."
@# rsync options: @# rsync options:
@# verbose: show each operation @# verbose: show each operation
@# links: preserve symlinks @# links: preserve symlinks
@ -20,7 +42,7 @@ publish: build #> Publish site
@# times: preserve modification times @# times: preserve modification times
@# delete: delete extraneous files, i.e., files on destination @# delete: delete extraneous files, i.e., files on destination
@# chmod: set permsions @# chmod: set permsions
@echo "\t Copying from public to ${DEST}" @echo "\t 📡 Copying from public to ${DEST}"
@rsync \ @rsync \
--verbose \ --verbose \
--recursive \ --recursive \
@ -36,3 +58,5 @@ publish: build #> Publish site
@ssh axs@sdf.org 'mkhomepg -p' @ssh axs@sdf.org 'mkhomepg -p'
@echo "✓ Publising complete" @echo "✓ Publising complete"
@echo "\nThe site should be available on ${SITE_URL}" @echo "\nThe site should be available on ${SITE_URL}"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#