@@ -46,6 +46,9 @@ mkdir $outputdir/bitbake
# We copy the releases.rst file from master so that all versions of the docs
# see the latest releases.
first_sphinx_commit=84ccba0f4aff91528f764523fe1205a354c889ed
+
+latest_branch=$(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)' --sort='-version:refname' | grep --max-count=1 "[0-9]*\.[0-9]*")
+
for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)'); do
if [ "$branch" = "HEAD" ]; then
continue
@@ -61,7 +64,12 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for
branch="next"
mkdir $outputdir/bitbake/$branch
elif [ "$branch" = "master" ]; then
+ branch="dev"
+ mkdir $outputdir/bitbake/$branch
+ elif [ "$branch" = "$latest_branch" ]; then
branch=""
+ mkdir $outputdir/bitbake/$latest_branch
+ cp -r ./_build/final/* $outputdir/bitbake/$latest_branch
else
mkdir $outputdir/bitbake/$branch
fi
@@ -83,6 +91,9 @@ cd $ypdocs
# Again, keeping even the no longer supported releases (see above comment)
first_sphinx_commit=01dd5af7954e24552aca022917669b27bb0541ed
first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236
+
+latest_tag=$(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" --sort="version:refname" 'yocto-*' | tail -1 | sed 's/yocto-//')
+
for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)') $(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" 'yocto-*') transition; do
if [ "$branch" = "HEAD" ]; then
continue
@@ -124,7 +135,14 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --
if [ "$branch" = "master-next" ]; then
branch="next"
mkdir $outputdir/$branch
- elif [ "$branch" = "master" ] || [ "$branch" = "transition" ]; then
+ elif [ "$branch" = "master" ]; then
+ branch="dev"
+ mkdir $outputdir/$branch
+ elif [ "$branch" = "$latest_tag" ]; then
+ branch=""
+ mkdir $outputdir/$latest_tag
+ cp -r ./_build/final/* $outputdir/$latest_tag
+ elif [ "$branch" = "transition" ]; then
branch=""
else
mkdir $outputdir/$branch