-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1227 from jim-parry/admin/docbot
Admin script for user guide build & deploy
- Loading branch information
Showing
6 changed files
with
87 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# CodeIgniter 4 Admin | ||
|
||
This folder contains tools or docs useful for project maintainers. | ||
|
||
- [docbot](./docbot.md) - build & deploy user guide | ||
- [release](./release.md) - build & deploy framework release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# docbot | ||
|
||
Builds & deploys user guide. | ||
|
||
The CI4 user guide, warts & all, is rebuilt in a nested | ||
repository clone (`user_guide_src/build/html`), with the result | ||
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://bcit-ci.github.io/CodeIgniter4/). | ||
|
||
## Audience | ||
|
||
This script is intended for use by framework maintainers, | ||
i.e. someone with commit rights on the CI4 repository. | ||
|
||
This script wraps the conventional user guide building, | ||
i.e. `user_guide_src/make html`, with additional | ||
steps. | ||
|
||
You will be prompted for your github credentials and | ||
GPG-signing key as appropriate. | ||
|
||
## Usage | ||
|
||
Inside a shell prompt, in the project root: | ||
|
||
`admin/docbot.sh [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 | ||
user_guide_src/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Rebuild and deploy CodeIgniter4 user guide | ||
|
||
UPSTREAM=https://github.com/bcit-ci/CodeIgniter4.git | ||
|
||
# Prepare the nested repo clone folder | ||
cd user_guide_src | ||
rm -rf build/* | ||
mkdir build/html | ||
|
||
# Get ready for git | ||
cd build/html | ||
git init | ||
git remote add origin $UPSTREAM | ||
git fetch origin gh-pages | ||
git checkout gh-pages | ||
git reset --hard origin/gh-pages | ||
rm -r * | ||
|
||
# Make the new user guide | ||
cd ../.. | ||
make html | ||
|
||
# All done? | ||
if [ $# -lt 1 ]; then | ||
exit 0 | ||
fi | ||
|
||
# Optionally update the remote repo | ||
if [ $1 = "deploy" ]; then | ||
cd build/html | ||
git add . | ||
git commit -S -m "Docbot synching" | ||
git push -f origin gh-pages | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# release | ||
|
||
Builds & deploys framework release. | ||
|
||
## Assumptions | ||
|
||
## Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Build and deploy framework release | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters