forked from bartvdbraak/blender
Python API Docs: update for using git buildinfo and change upload URL
This commit is contained in:
parent
3e49787b01
commit
f85ccedb93
@ -384,12 +384,12 @@ MODULE_GROUPING = {
|
|||||||
blender_version_strings = [str(v) for v in bpy.app.version]
|
blender_version_strings = [str(v) for v in bpy.app.version]
|
||||||
|
|
||||||
# converting bytes to strings, due to #30154
|
# converting bytes to strings, due to #30154
|
||||||
BLENDER_REVISION = str(bpy.app.build_revision, 'utf_8')
|
BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8')
|
||||||
BLENDER_DATE = str(bpy.app.build_date, 'utf_8')
|
BLENDER_DATE = str(bpy.app.build_date, 'utf_8')
|
||||||
|
|
||||||
BLENDER_VERSION_DOTS = ".".join(blender_version_strings) # '2.62.1'
|
BLENDER_VERSION_DOTS = ".".join(blender_version_strings) # '2.62.1'
|
||||||
if BLENDER_REVISION != "Unknown":
|
if BLENDER_REVISION != "Unknown":
|
||||||
BLENDER_VERSION_DOTS += " r" + BLENDER_REVISION # '2.62.1 r44584'
|
BLENDER_VERSION_DOTS += " " + BLENDER_REVISION # '2.62.1 SHA1'
|
||||||
|
|
||||||
BLENDER_VERSION_PATH = "_".join(blender_version_strings) # '2_62_1'
|
BLENDER_VERSION_PATH = "_".join(blender_version_strings) # '2_62_1'
|
||||||
if bpy.app.version_cycle == "release":
|
if bpy.app.version_cycle == "release":
|
||||||
|
@ -17,7 +17,7 @@ DO_OUT_PDF=false
|
|||||||
|
|
||||||
BLENDER="./blender.bin"
|
BLENDER="./blender.bin"
|
||||||
SSH_USER="ideasman42"
|
SSH_USER="ideasman42"
|
||||||
SSH_HOST=$SSH_USER"@emo.blender.org"
|
SSH_HOST=$SSH_USER"@blender.org"
|
||||||
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
|
SSH_UPLOAD="/data/www/vhosts/www.blender.org/documentation" # blender_python_api_VERSION, added after
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@ -99,18 +99,18 @@ fi
|
|||||||
if $DO_UPLOAD ; then
|
if $DO_UPLOAD ; then
|
||||||
|
|
||||||
cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
|
cp $SPHINXBASE/sphinx-out/contents.html $SPHINXBASE/sphinx-out/index.html
|
||||||
ssh $SSH_USER@emo.blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
|
ssh $SSH_USER@blender.org 'rm -rf '$SSH_UPLOAD_FULL'/*'
|
||||||
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
|
rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/* $SSH_HOST:$SSH_UPLOAD_FULL/
|
||||||
|
|
||||||
## symlink the dir to a static URL
|
## symlink the dir to a static URL
|
||||||
#ssh $SSH_USER@emo.blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
|
#ssh $SSH_USER@blender.org 'rm '$SSH_UPLOAD'/250PythonDoc && ln -s '$SSH_UPLOAD_FULL' '$SSH_UPLOAD'/250PythonDoc'
|
||||||
|
|
||||||
# better redirect
|
# better redirect
|
||||||
ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
|
ssh $SSH_USER@blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
|
||||||
|
|
||||||
# redirect for release only so wiki can point here
|
# redirect for release only so wiki can point here
|
||||||
if [ "$blender_version_cycle" == "release" ] ; then
|
if [ "$blender_version_cycle" == "release" ] ; then
|
||||||
ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/blender_python_api/index.html'
|
ssh $SSH_USER@blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/blender_python_api/index.html'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $DO_OUT_PDF ; then
|
if $DO_OUT_PDF ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user