alexkarle.com

Source for alexkarle.com
git clone git://git.alexkarle.com/alexkarle.com.git
Log | Files | Refs | README | LICENSE

commit c29e34a819c29483bccd53176d7a5e09cfd3d37a (patch)
parent 2c836a463c9414602cb112bee3f0c3ca05a4599b
Author: Alex Karle <alex@alexkarle.com>
Date:   Wed, 23 Dec 2020 15:51:28 -0500

make: Update release to use $HOST variable

I learned recently that make variables passed on the cli override even
regular assignment (=).

I used this recently to migrate to a new server without updating the
make recipe with an IP:

	$ make release HOST=1.1.1.1  # real ip here

Diffstat:
MMakefile | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,4 +1,5 @@ -DEST = /var/www/htdocs/karleco +HOST = alexkarle.com +DEST = /var/www/htdocs .PHONY: build build: @@ -11,5 +12,5 @@ install: build .PHONY: release release: - rsync --delete --exclude=.git -av ./ alexkarle.com:karleco/ && \ - ssh -t alexkarle.com doas make -C karleco install + rsync --delete --exclude=.git -av ./ $(HOST):karleco/ && \ + ssh -t $(HOST) doas make -C karleco install