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