File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh -e
22set -x
3+ # GITHUB_ACTIONS=true SOURCE_TAG=test ./release_docs.sh
4+
35if [ " ${GITHUB_ACTIONS} " = " " ];
46then
57 echo " Cannot release docs without GITHUB_ACTIONS set"
68 exit 0;
79fi
10+ if [ " ${SOURCE_TAG} " = " " ];
11+ then
12+ echo " Cannot release docs without SOURCE_TAG set"
13+ exit 0;
14+ fi
815REPO=" https://github.com/parse-community/Parse-SDK-JS"
916
1017rm -rf docs
@@ -13,16 +20,16 @@ cd docs
1320git pull origin gh-pages
1421cd ..
1522
16- DEST=" master"
23+ RELEASE=" release"
24+ VERSION=" ${SOURCE_TAG} "
1725
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"
2428
2529npm run docs
2630
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