mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Add apibot for API docs using phpDocumentor
This commit is contained in:
parent
895ae04f86
commit
1a558a95e0
7
admin/alldocs
Executable file
7
admin/alldocs
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Rebuild and deploy all CodeIgniter4 docs
|
||||
#
|
||||
|
||||
. admin/docbot $1
|
||||
. admin/apibot $1
|
42
admin/apibot
Executable file
42
admin/apibot
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Rebuild and deploy CodeIgniter4 under-development user guide
|
||||
#
|
||||
# This is a quick way to test user guide changes, and if they
|
||||
# look good, to push them to the gh-pages branch of the
|
||||
# development repository.
|
||||
#
|
||||
# This is not meant for updating the "stable" user guide.
|
||||
|
||||
UPSTREAM=https://github.com/codeigniter4/api.git
|
||||
|
||||
# Prepare the nested repo clone folder
|
||||
rm -rf build/api*
|
||||
mkdir -p build/api/docs
|
||||
|
||||
# Get ready for git
|
||||
cd build/api
|
||||
git init
|
||||
git remote add origin $UPSTREAM
|
||||
git fetch
|
||||
git checkout master
|
||||
git reset --hard origin/master
|
||||
rm -r docs/*
|
||||
|
||||
# Make the new user guide
|
||||
cd ../..
|
||||
phpdoc
|
||||
cp -R api/build/* build/api/docs
|
||||
|
||||
# All done?
|
||||
if [ $# -lt 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Optionally update the remote repo
|
||||
if [ $1 = "deploy" ]; then
|
||||
cd build/api
|
||||
git add .
|
||||
git commit -S -m "APIbot synching"
|
||||
git push -f origin master
|
||||
fi
|
36
admin/apibot.md
Normal file
36
admin/apibot.md
Normal file
@ -0,0 +1,36 @@
|
||||
# apibot
|
||||
|
||||
Builds & deploys API docs.
|
||||
|
||||
The in-progress CI4 API docs, warts & all, are rebuilt and
|
||||
then copied to a nested
|
||||
repository clone (`build/api`), with the result
|
||||
optionally pushed to the `master` branch of the `api` repo.
|
||||
That would then be publically visible as the in-progress
|
||||
version of the [API](https://codeigniter4.github.io/api/).
|
||||
|
||||
## Requirements
|
||||
|
||||
You must have phpDocumentor installed, with a `phpdoc` alias installed globally.
|
||||
|
||||
## Audience
|
||||
|
||||
This script is intended for use by framework maintainers,
|
||||
i.e. someone with commit rights on the CI4 repository.
|
||||
|
||||
You will be prompted for your github credentials and
|
||||
GPG-signing key as appropriate.
|
||||
|
||||
## Usage
|
||||
|
||||
Inside a shell prompt, in the project root:
|
||||
|
||||
`admin/apibot [deploy]`
|
||||
|
||||
If "deploy" is not added, the script execution is considered
|
||||
a trial run, and nothing is pushed to the repo.
|
||||
|
||||
Whether or not deployed, the results are left inside
|
||||
`build/api` (which is git ignored).
|
||||
|
||||
Generate these and the userguide together with the 'alldocs' script.
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
# This is not meant for updating the "stable" user guide.
|
||||
|
||||
UPSTREAM=https://github.com/bcit-ci/CodeIgniter4.git
|
||||
UPSTREAM=https://github.com/codeigniter4/CodeIgniter4.git
|
||||
|
||||
# Prepare the nested repo clone folder
|
||||
cd user_guide_src
|
||||
|
@ -8,6 +8,10 @@ optionally pushed to the `gh-pages` branch of the repo.
|
||||
That would then be publically visible as the in-progress
|
||||
version of the [User Guide](https://codeigniter4.github.io/CodeIgniter4/).
|
||||
|
||||
## Requirements
|
||||
|
||||
You must have python & sphinx installed.
|
||||
|
||||
## Audience
|
||||
|
||||
This script is intended for use by framework maintainers,
|
||||
@ -31,3 +35,5 @@ a trial run, and nothing is pushed to the repo.
|
||||
|
||||
Whether or not deployed, the results are left inside
|
||||
user_guide_src/build (which is git ignored).
|
||||
|
||||
Generate these and the API docs together with the 'alldocs' script.
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<phpdoc>
|
||||
<title>CodeIgniter v4.0.0 API</title>
|
||||
<title>CodeIgniter v4.0 API</title>
|
||||
<parser>
|
||||
<target>api/data/</target>
|
||||
</parser>
|
||||
|
Loading…
x
Reference in New Issue
Block a user