File tree 1 file changed +16
-9
lines changed
1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh -e
2
2
set -x
3
+ # GITHUB_ACTIONS=true SOURCE_TAG=test ./release_docs.sh
4
+
3
5
if [ " ${GITHUB_ACTIONS} " = " " ];
4
6
then
5
7
echo " Cannot release docs without GITHUB_ACTIONS set"
6
8
exit 0;
7
9
fi
10
+ if [ " ${SOURCE_TAG} " = " " ];
11
+ then
12
+ echo " Cannot release docs without SOURCE_TAG set"
13
+ exit 0;
14
+ fi
8
15
REPO=" https://github.com/parse-community/Parse-SDK-JS"
9
16
10
17
rm -rf docs
@@ -13,16 +20,16 @@ cd docs
13
20
git pull origin gh-pages
14
21
cd ..
15
22
16
- DEST=" master"
23
+ RELEASE=" release"
24
+ VERSION=" ${SOURCE_TAG} "
17
25
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
26
+ # change the default page to the latest
27
+ echo " <meta http-equiv='refresh' content='0; url=/Parse-SDK-JS/api/${VERSION} '>" > " docs/api/index.html"
24
28
25
29
npm run docs
26
30
27
- mkdir -p " docs/api/${DEST} "
28
- cp -R out/* " docs/api/${DEST} "
31
+ mkdir -p " docs/api/${RELEASE} "
32
+ cp -R out/* " docs/api/${RELEASE} "
33
+
34
+ mkdir -p " docs/api/${VERSION} "
35
+ cp -R out/* " docs/api/${VERSION} "
You can’t perform that action at this time.
0 commit comments