Skip to content

Commit e873eaa

Browse files
committed
docs: Generate api documentation for release branch
1 parent e0b713e commit e873eaa

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

release_docs.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ then
55
echo "Cannot release docs without GITHUB_ACTIONS set"
66
exit 0;
77
fi
8+
if [ "${SOURCE_TAG}" = "" ];
9+
then
10+
echo "Cannot release docs without SOURCE_TAG set"
11+
exit 0;
12+
fi
813
REPO="https://github.com/parse-community/Parse-SDK-JS"
914

1015
rm -rf docs
@@ -13,16 +18,16 @@ cd docs
1318
git pull origin gh-pages
1419
cd ..
1520

16-
DEST="master"
21+
RELEASE="release"
22+
VERSION="${SOURCE_TAG}"
1723

18-
if [ "${SOURCE_TAG}" != "" ];
19-
then
20-
DEST="${SOURCE_TAG}"
21-
# change the default page to the latest
22-
echo "<meta http-equiv='refresh' content='0; url=/Parse-SDK-JS/api/${DEST}'>" > "docs/api/index.html"
23-
fi
24+
# change the default page to the latest
25+
echo "<meta http-equiv='refresh' content='0; url=/Parse-SDK-JS/api/${VERSION}'>" > "docs/api/index.html"
2426

2527
npm run docs
2628

27-
mkdir -p "docs/api/${DEST}"
28-
cp -R out/* "docs/api/${DEST}"
29+
mkdir -p "docs/api/${RELEASE}"
30+
cp -R out/* "docs/api/${RELEASE}"
31+
32+
mkdir -p "docs/api/${VERSION}"
33+
cp -R out/* "docs/api/${VERSION}"

0 commit comments

Comments
 (0)