diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..1ab823bb --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# Copy this file as .env +# SSH account & hostname for publishing. +WEBSERVER_SSH_=user@domain +WEBSERVER_ROOT=/path-to/flamenco.blender.org diff --git a/.gitignore b/.gitignore index 151fe05c..c304f8f5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.db *.blend[0-9] *.flamenco.blend +.env /flamenco-manager /flamenco-worker diff --git a/Makefile b/Makefile index 5079bf8e..94ea9eee 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +-include .env + PKG := git.blender.org/flamenco # To update the version number in all the relevant places, update the VERSION @@ -41,9 +43,17 @@ FFMPEG_VERSION=5.0.1 TOOLS=./tools TOOLS_DOWNLOAD=./tools/download -# SSH account & hostname for publishing. -WEBSERVER_SSH=flamenco@flamenco.blender.org -WEBSERVER_ROOT=/var/www/flamenco.blender.org +# 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 @@ -230,9 +240,11 @@ clean-webapp-static: touch ${WEB_STATIC}/emptyfile project-website: + $(MAKE) 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}/ \ + -e "ssh" \ -va \ --exclude v2/ \ --exclude downloads/ \ @@ -338,6 +350,7 @@ release-package-windows: .PHONY: publish-release-packages publish-release-packages: + $(MAKE) 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} \ diff --git a/web/project-website/content/development/releasing/_index.md b/web/project-website/content/development/releasing/_index.md index ca5294d1..7cab8b18 100644 --- a/web/project-website/content/development/releasing/_index.md +++ b/web/project-website/content/development/releasing/_index.md @@ -12,14 +12,15 @@ people. Replace `${VERSION}` with the actual version number. +1. Ensure that env variables are set in the `.env` file (see `.env.example` for reference) 1. Update `CHANGELOG.md` and mark the to-be-released version as released today. -2. Update `web/project-website/data/flamenco.yaml` for the new version. -3. Update `Makefile` and change the `VERSION` and `RELEASE_CYCLE` variables. -4. `make update-version` -5. `git commit -m "Bump version to ${VERSION}"` -6. `git tag v${VERSION}` -7. `make release-package` -8. Check that the files in `dist/` are there and have a non-zero size. -9. `make publish-release-packages` to upload the packages to the website. -10. `make project-website` to generate and publish the new website. -11. `git push && git push --tags` +1. Update `web/project-website/data/flamenco.yaml` for the new version. +1. Update `Makefile` and change the `VERSION` and `RELEASE_CYCLE` variables. +1. `make update-version` +1. `git commit -m "Bump version to ${VERSION}"` +1. `git tag v${VERSION}` +1. `make release-package` +1. Check that the files in `dist/` are there and have a non-zero size. +1. `make publish-release-packages` to upload the packages to the website. +1. `make project-website` to generate and publish the new website. +1. `git push && git push --tags`