comparison website/www/Makefile @ 8044:f9eaaa63fda2

build: update website build to sync built files Sourceforge only supports python 2.7. Newer version of sphinx are required to build docs and they don't work with 2.7. Set up rsync targets that: 1) copy html build directory to sourceforge target directory (dev_docs, production and user home directory) 2) backup existing sourceforge target directory re-sync so it can be served without any missing files. The Makefile now check to see if .orig or *~ files are present in the html build tree. It lists the garbage file and fails if so. Also inserts a .htaccess into the tree to prevent access to: .buildinfo file docs_backup-* files *.orig *~ The first one is a build artifact from newer version of sphinx. The second is the backup directory created with all the original files before a rsync from the local system is done to sourceforge. The backup directory is timestamped with the time of its sync. The last two are probably redundant since make html will fail if they exist. To rollback a sync: move the target directory to a new name. move the backup directory (in the renamed target directory) to the old target directory name. I added the --delete flag to remove files missing from the html directory. Using the -no-times flags will create all new files with the current directory. Using the --backup, --backup-dir flags backs up all replaced/deleted files to backup-dir. The --exclude flag preserves the backup directories on the sourceforge side. Without --exclude the -delete flag would remove these backup-dir's. Note that --delete-exclude must not be used otherwise the backup directories will be deleted.
author John Rouillard <rouilj@ieee.org>
date Wed, 26 Jun 2024 19:11:35 -0400
parents 2ab234484708
children 6d4b5005abf2
comparison
equal deleted inserted replaced
8043:69629a4f7262 8044:f9eaaa63fda2
33 sed -i -e '/<meta/s/og\\:/og:/' \ 33 sed -i -e '/<meta/s/og\\:/og:/' \
34 -e '/<meta/s/name="og:/property="og:/' html/index.html 34 -e '/<meta/s/name="og:/property="og:/' html/index.html
35 cp robots.txt html/robots.txt 35 cp robots.txt html/robots.txt
36 mkdir html/signatures && cp signatures/*.asc html/signatures 36 mkdir html/signatures && cp signatures/*.asc html/signatures
37 cp --no-clobber -r docs/html_extra/. html/docs/. 37 cp --no-clobber -r docs/html_extra/. html/docs/.
38 cp htaccess html/.htaccess
39 @echo; \
40 l=$$(find html -name '*.orig' -o -name '*~' | tee /dev/tty | wc -l);\
41 if [ $$l -ne 0 ]; then echo "Garbage files found" && false; fi
38 42
39 linkcheck: 43 linkcheck:
40 mkdir -p $(TMP)/linkcheck $(TMP)/doctrees 44 mkdir -p $(TMP)/linkcheck $(TMP)/doctrees
41 sphinx-build -b linkcheck -d $(TMP)/doctrees . $(TMP)/linkcheck 45 sphinx-build -b linkcheck -d $(TMP)/doctrees . $(TMP)/linkcheck
42 @echo 46 @echo
43 @echo "Link check complete; look for any errors in the above output " \ 47 @echo "Link check complete; look for any errors in the above output " \
44 "or in .build/linkcheck/output.txt." 48 "or in .build/linkcheck/output.txt."
45 49
46 sourceforge_dev_sync: 50 sourceforge_dev_sync:
47 rsync -av html/. web.sourceforge.net:/home/project-web/roundup/htdocs/dev_docs/. 51 # --no-times makes _images/* and other files sync over every time
52 # so docs_backup-... is complete with all files and can be served
53 # as the docs tree. Without --no-times _static, _images and other
54 # directories are missing from the backup directory.
55 # Exclude docs_backup so it won't be deleted from sourceforge
56 # since:
57 # --delete-exclude
58 # IS NOT (and must not be) SET
59 read -p "sync to dev_docs y/N? " resp; echo "$$resp" | grep -i "^y"
60 rsync -av --no-times --delete --exclude 'docs_backup*' \
61 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \
62 html/. \
63 web.sourceforge.net:/home/project-web/roundup/htdocs/dev_docs/.
48 64
49 sourceforge_prod_sync: 65 sourceforge_prod_sync:
50 read -p "sync to production y/N? " resp; echo "$$resp" | grep -i "^y" 66 read -p "sync to production y/N? " resp; echo "$$resp" | grep -i "^y"
51 rsync -av html/. web.sourceforge.net:/home/project-web/roundup/htdocs/. 67 rsync -av --no-times --delete --exclude 'docs_backup*' \
68 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \
69 html/. \
70 web.sourceforge.net:/home/project-web/roundup/htdocs/.
71
72 sourceforge_home_sync:
73 read -p "sync to home y/N? " resp; echo "$$resp" | grep -i "^y"
74 rsync -av --no-times --delete --exclude 'docs_backup*' \
75 --backup --backup-dir docs_backup-`date --iso-8601=seconds` \
76 html/. \
77 web.sourceforge.net:roundup_docs/.

Roundup Issue Tracker: http://roundup-tracker.org/