Fix check-environment
Makefile
rule
Bunch of improvements to the `check-environment` rule: - it was listed as the first target in `Makefile`, causing it to be run when you just use `make`. It's now moved down to where it is first used. - Call with `$(MAKE) -s` so that there is less logging noise. - Use `@echo` so that there is less logging noise. - Change the example to set the right environment variable (it had a trailing underscore).
This commit is contained in:
parent
9915951007
commit
77ff6151bd
@ -1,4 +1,4 @@
|
||||
# Copy this file as .env
|
||||
# SSH account & hostname for publishing.
|
||||
WEBSERVER_SSH_=user@domain
|
||||
WEBSERVER_SSH=user@domain
|
||||
WEBSERVER_ROOT=/path-to/flamenco.blender.org
|
||||
|
29
Makefile
29
Makefile
@ -43,18 +43,6 @@ FFMPEG_VERSION=5.0.1
|
||||
TOOLS=./tools
|
||||
TOOLS_DOWNLOAD=./tools/download
|
||||
|
||||
# For production deployments: check variables stored in .env
|
||||
.PHONY: check-environment
|
||||
check-environment:
|
||||
ifndef WEBSERVER_SSH
|
||||
echo "WEBSERVER_SSH not found. Check .env or .env.example"
|
||||
exit 1
|
||||
endif
|
||||
ifndef WEBSERVER_ROOT
|
||||
echo "WEBSERVER_ROOT not found. Check .env or .env.example"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
all: application
|
||||
|
||||
# Install generators and build the software.
|
||||
@ -240,7 +228,7 @@ clean-webapp-static:
|
||||
touch ${WEB_STATIC}/emptyfile
|
||||
|
||||
project-website:
|
||||
$(MAKE) check-environment
|
||||
$(MAKE) -s check-environment
|
||||
rm -rf web/project-website/public/
|
||||
cd web/project-website; hugo --baseURL https://flamenco.blender.org/
|
||||
rsync web/project-website/public/ ${WEBSERVER_SSH}:${WEBSERVER_ROOT}/ \
|
||||
@ -252,6 +240,19 @@ project-website:
|
||||
--exclude .htaccess \
|
||||
--delete-after
|
||||
|
||||
# For production deployments: check variables stored in .env
|
||||
.PHONY: check-environment
|
||||
check-environment:
|
||||
ifndef WEBSERVER_SSH
|
||||
@echo "WEBSERVER_SSH not found. Check .env or .env.example"
|
||||
exit 1
|
||||
endif
|
||||
ifndef WEBSERVER_ROOT
|
||||
@echo "WEBSERVER_ROOT not found. Check .env or .env.example"
|
||||
exit 1
|
||||
endif
|
||||
|
||||
|
||||
# Download & install FFmpeg in the 'tools' directory for supported platforms.
|
||||
.PHONY: tools
|
||||
tools:
|
||||
@ -350,7 +351,7 @@ release-package-windows:
|
||||
|
||||
.PHONY: publish-release-packages
|
||||
publish-release-packages:
|
||||
$(MAKE) check-environment
|
||||
$(MAKE) -s check-environment
|
||||
cd dist; sha256sum ${RELEASE_PACKAGE_LINUX} ${RELEASE_PACKAGE_DARWIN} ${RELEASE_PACKAGE_WINDOWS} > ${RELEASE_PACKAGE_SHAFILE}
|
||||
cd dist; rsync -va \
|
||||
${RELEASE_PACKAGE_LINUX} ${RELEASE_PACKAGE_DARWIN} ${RELEASE_PACKAGE_WINDOWS} ${RELEASE_PACKAGE_SHAFILE} \
|
||||
|
Loading…
Reference in New Issue
Block a user