Updated build.sh to properly reset the current branch while building documentation.
Merge branch 'v5-stable' into v7-stable