File: release-api-docs.sh

package info (click to toggle)
node-ace-code 1.40.1%2B~cs1.7.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,816 kB
  • sloc: javascript: 258,622; sh: 231; asm: 185; makefile: 130; xml: 85; jsp: 85; objc: 77; lisp: 52; cpp: 34; java: 34; tcl: 30; cobol: 30; pascal: 29; ruby: 27; vhdl: 25; fortran: 21; erlang: 17; python: 13; php: 12; perl: 11; haskell: 10; ml: 10; sql: 6; ada: 5; cs: 3
file content (66 lines) | stat: -rw-r--r-- 1,384 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
set -e


cd `dirname $0`/..
SOURCE=`pwd`

mkdir -p .apigenerator

# check if api dir is clean
if ! [ -f .apigenerator/.git/HEAD ]; then
    git clone git@github.com:ajaxorg/ace-api-docs.git .apigenerator
fi

pushd .apigenerator
git pull origin master # fetch

rm -rf ./doc

npm i
export ACE_VERSION="v$(node -p 'require("../package.json").version')"
node generateDoc.js ./doc

rm -rf ./doc-repo
git worktree prune
git worktree add --force --no-checkout doc-repo origin/gh-pages

cd doc-repo
mv ../doc/* .
git reset origin/gh-pages
git add .

if [ "$(git status --porcelain)" ];  then
    git commit -m "build api reference $ACE_VERSION"
    git push origin HEAD:gh-pages --force
fi

popd



git worktree prune
rm -rf .apigenerator/ace-gh-pages
git worktree add --force --no-checkout .apigenerator/ace-gh-pages HEAD


pushd .apigenerator/ace-gh-pages
git reset > /dev/null
git rm -rf api  || :
mv ../doc-repo ./api
echo '[submodule "doc/wiki"]
        path = doc/wiki
        url = https://github.com/ajaxorg/ace.wiki.git
[submodule "build"]
        path = build
        url = https://github.com/ajaxorg/ace-builds.git
[submodule "api"]
        path = api
        url = https://github.com/ajaxorg/ace-api-docs.git' > .gitmodules
git add .gitmodules api

git commit -m "build api reference $ACE_VERSION"

git push --progress "origin"  HEAD:refs/heads/gh-pages --force

popd