Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base docker build commands on their target docs version #9410

Open
wants to merge 1 commit into
base: release_3.40
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cronjob.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ git stash drop
# get latest version from github
git pull

# Return release number from branch name e.g. master, 3.34
TARGETBRANCH=`git branch --show-current | sed 's,release_,,g'`
TARGETREPO="QGIS-Documentation"

if [[ "$TARGETBRANCH" != "master" ]]; then \
TARGETREPO=$TARGETREPO-$TARGETBRANCH
fi;

# NOTE: docker builds and rsync's the build/zip/pdf to the local mounted /site dir
# AFTER the build, we are going to rsync everything to www2.qgis.org
docker run -v $PWD:/build -v /var/www/qgisdata/QGIS-Documentation-3.40/live/html:/site -w="/build" --rm=true --name="qgis_docs_3.40_build" qgis/sphinx_pdf_3 make all
docker run -v $PWD:/build -v /var/www/qgisdata/$TARGETREPO/live/html:/site -w="/build" --rm=true --name="qgis_docs_"$TARGETBRANCH"_build" qgis/sphinx_pdf_3 make all
# in one go: ALL languages, the zip's AND the pdf's:
rsync -hrzc --delete --progress /var/www/qgisdata/QGIS-Documentation-3.40/live/html www2.qgis.org:/var/www/qgisdata/QGIS-Documentation-3.40/live/;
rsync -hrzc --delete --progress /var/www/qgisdata/$TARGETREPO/live/html www2.qgis.org:/var/www/qgisdata/$TARGETREPO/live/;

now=`date`
echo "Finished: $now"
6 changes: 5 additions & 1 deletion docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@

cp ~/.transifexrc .
pwd=$(pwd)
docker run -v $pwd:/build -w="/build" --rm=true --name="qgis_docs_3.40_build" qgis/sphinx_pdf_3 make $@

# Return release number from branch name e.g. master, 3.34
TARGETBRANCH=`git branch --show-current | sed 's,release_,,g'`

docker run -v $pwd:/build -w="/build" --rm=true --name="qgis_docs_"$TARGETBRANCH"_build" qgis/sphinx_pdf_3 make $@
rm -rf .transifexrc
14 changes: 11 additions & 3 deletions docker-world.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ git stash drop
# get latest version
git pull

# Return release number from branch name e.g. master, 3.34
TARGETBRANCH=`git branch --show-current | sed 's,release_,,g'`
TARGETREPO="QGIS-Documentation"

if [[ "$TARGETBRANCH" != "master" ]]; then \
TARGETREPO=$TARGETREPO-$TARGETBRANCH
fi;

# only languages which have translations in transifex
#: ${langs:=en ca da de es fa fi fr gl hu id it ja km_KH ko lt nl pl pt_BR pt_PT ro tr ru uk zh-Hans zh-Hant}
: ${langs:=en}
Expand All @@ -42,9 +50,9 @@ for l in $langs
#time rsync -hvrzc --delete --progress build/pdf /var/www/qgisdata/QGIS-Documentation-3.40/live/html
#time rsync -hvrzc --delete --progress build/zip /var/www/qgisdata/QGIS-Documentation-3.40/live/html
# 20220317: local sync to new www2
time rsync -hvrzc --delete --progress build/html/$l [email protected]:/var/www/qgisdata/QGIS-Documentation-3.40/live/html
time rsync -hvrzc --delete --progress build/pdf [email protected]:/var/www/qgisdata/QGIS-Documentation-3.40/live/html
time rsync -hvrzc --delete --progress build/zip [email protected]:/var/www/qgisdata/QGIS-Documentation-3.40/live/html
time rsync -hvrzc --delete --progress build/html/$l [email protected]:/var/www/qgisdata/$TARGETREPO/live/html
time rsync -hvrzc --delete --progress build/pdf [email protected]:/var/www/qgisdata/$TARGETREPO/live/html
time rsync -hvrzc --delete --progress build/zip [email protected]:/var/www/qgisdata/$TARGETREPO/live/html
else
echo "Build FAILED: not syncing to web";
fi
Expand Down
8 changes: 2 additions & 6 deletions release_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ New releases are branched off the `master` branch and thus require a set of chan
- [ ] In [README.MD](README.MD) file, update the badges to point to the current branch instead of `master`,
and current version instead of `testing`
- [ ] In [Makefile](Makefile) file, set the `VERSION` number as in the conf.py file
- [ ] In [docker-world.sh](docker-world.sh) file: replace `QGIS-Documentation` with `QGIS-Documentation-x.y`
- [ ] In [cronjob.sh](cronjob.sh) file:
- [ ] replace `QGIS-Documentation` with `QGIS-Documentation-x.y`
- [ ] replace `qgis_docs_master_build` with `qgis_docs_x.y_build`
- [ ] In [doctest.dockerfile](doctest.dockerfile): set the project container to pull QGIS sources from (i.e. `release-x_y`)
- [ ] In main [index.rst](docs/index.rst) file: replace `testing` with `x.y` in the Table Of Contents
</details>
Expand Down Expand Up @@ -174,5 +170,5 @@ Automating the process as much as possible would lower the risk and make it less

* Some values are somehow copy-pasted across places while they could likely be put in a variable:

* languages list: they are defined in docs_conf.yml, Makefile, docker-world.sh
* version number: it is defined in conf.py, Makefile, docker-world.sh, cronjob.sh, doctest.dockerfile
* languages list: they are defined in docs_conf.yml, Makefile
* version number: it is defined in conf.py, Makefile, doctest.dockerfile
Loading