-
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 branch 'develop' into db_indexes
- Loading branch information
Showing
430 changed files
with
17,227 additions
and
13,341 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
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 |
---|---|---|
@@ -1,6 +1,76 @@ | ||
# CodeIgniter 4 Admin | ||
#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 | ||
##Repositories Organization, inside https://github.com/codeigniter4 | ||
|
||
- **CodeIgniter4** is the main development repository. | ||
It supports issues and pull requests, and has a rule to enforce GPG-signed commits. | ||
In addition to the framework source, it includes unit testing and documentation source. | ||
The three repositories following are built from this one as part of the release workflow. | ||
This repo is meant to be forked by contributors. | ||
|
||
- **framework** is the released developer repository. | ||
It contains all the main pieces of the framework that developers would use to | ||
build their apps, but not the framework unit testing or the user guide source. | ||
It is meant to be downloaded by developers, or composer-installed. | ||
This is a read-only repository. | ||
- **appstarter** is the released application starter repository. | ||
It is derived from the framework's `application` and `public` folders, with | ||
a composer requirement dependency to pull in the framework itself. | ||
It is meant to be downloaded or composer-installed. | ||
This is a read-only repository. | ||
- **userguide** is released documentation publishing repository. | ||
It contains built versions of the user guide, corresponding to the | ||
framework releases. | ||
It could be downloaded, forked or composer-installed. | ||
This is a read-only repository. | ||
|
||
- **coding-standard** is the coding style standards repository. | ||
It contains PHP CodeSniffer rules to ensure consistent code style | ||
within the framework itself. | ||
It is meant to be composer-installed. | ||
- **translations** is the repository holding official translations of | ||
the locale-dependent system messages. | ||
It is community-maintained, and accepts issues and pull requests. | ||
It could be downloaded, forked or composer-installed. | ||
|
||
##Contributor Scripts | ||
|
||
- **setup.sh** installs a git pre-commit hook into a contributor's | ||
local clone of their fork of the `CodeIgniter4` repository. | ||
- **pre-commit** runs PHP Lint and PHP CodeSniffer on any files | ||
to be added as part of a git commit, ensuring that they conform to the | ||
framework coding style standards, and automatically fixing what can be. | ||
|
||
##Maintainer Scripts | ||
|
||
- **docbot** re-builds the user guide from the RST source for it, | ||
and optionally deploys it to the `gh-pages` branch of the main | ||
repository (if the user running it has maintainer rights on that repo). | ||
See the [writeup](./docbot.md). | ||
|
||
##Release Building Scripts | ||
|
||
The release workflow is detailed in its own writeup; these are the main | ||
scripts used by the release manager: | ||
|
||
- **pre-release** builds a new release branch in the main repo, for vetting. | ||
This includes updating version dependencies or constants, | ||
generating version(s) of the user guide; and possibly | ||
moving or ignoring stuff, distinguishing release from development. | ||
If successful, it will leave a `releasing` file, with the version number | ||
in it. | ||
- **release** builds release branches for the derived repositories | ||
(framework, appstarter and userguide). | ||
These are pushed to the respective repositories (if the user has maintainer | ||
rights), but the actual associated releases are created on github.com manually, so | ||
that additional binaries can be added to the release if appropriate. | ||
- **post-release** cleans up after a release, eg. setting up the changelog for | ||
the next release. | ||
|
||
|
||
##Other Stuff | ||
|
||
- **release-notes.bb** is a boilerplate for forum announcements of a new release. | ||
It is marked up using [BBcode](https://en.wikipedia.org/wiki/BBCode). |
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
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
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
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,135 @@ | ||
#!/bin/bash | ||
#######################DO NOT USE YET######################## | ||
|
||
## Build a framework release branch | ||
|
||
#--------------------------------------------------- | ||
# Setup variables | ||
|
||
UPSTREAM=https://github.com/codeigniter4/CodeIgniter4.git | ||
action=test | ||
version=4 | ||
qualifier= | ||
|
||
branch=release- | ||
releasable='application docs public system writable README.md composer.json contributing.md env license.txt spark' | ||
release_empty='tests tests/_support' | ||
which=release | ||
|
||
BOLD='\033[1m' | ||
NORMAL='\033[0m' | ||
COLOR='\033[1;31m' | ||
ERROR='\033[0;31m' | ||
|
||
echo -e "${BOLD}${COLOR}CodeIgniter4 release builder${NORMAL}" | ||
echo '----------------------------' | ||
|
||
#--------------------------------------------------- | ||
# Check arguments | ||
echo -e "${BOLD}Checking arguments...${NORMAL}" | ||
|
||
if [ $# -lt 1 ]; then | ||
echo -e "${BOLD}Usage: admin/release version# pre-release-qualifier${NORMAL}" | ||
exit 1 | ||
fi | ||
|
||
|
||
version=$1 | ||
if [ $# -gt 1 ]; then | ||
qualifier="-${2}" | ||
which='pre-release' | ||
fi | ||
branch="release-$version$qualifier" | ||
|
||
#--------------------------------------------------- | ||
# Create the release branch | ||
echo -e "${BOLD}Creating $which $branch to $action ${NORMAL}" | ||
|
||
git checkout develop | ||
git branch -d $branch &>/dev/null # remove the branch if there | ||
git checkout -b $branch | ||
composer update | ||
|
||
#--------------------------------------------------- | ||
# Update version dependencies | ||
echo -e "${BOLD}Updating version dependencies${NORMAL}" | ||
|
||
function check_unique { | ||
count=`grep -c '$1' < $2 | wc -l` | ||
if [ $count -ne 1 ]; then | ||
echo -e "${BOLD}${COLOR}$2 has ${count} occurences of '$1'${NORMAL}" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Make sure there is only one line to affect in each file | ||
check_unique "const CI_VERSION" 'system/CodeIgniter.php' | ||
check_unique "release =" 'user_guide_src/source/conf.py' | ||
check_unique "|release|" 'user_guide_src/source/changelog.rst' | ||
check_unique "Release Date.*Not Released" 'user_guide_src/source/changelog.rst' | ||
|
||
# CI_VERSION definition in system/CodeIgniter.php | ||
sed -i "/const CI_VERSION/s/'.*'/'${version}${qualifier}'/" system/CodeIgniter.php | ||
|
||
# release substitution variable in user_guide_src/source/conf.py | ||
sed -i "/release =/s/'.*'/'${version}${qualifier}'/" user_guide_src/source/conf.py | ||
|
||
# version & date in user_guide_src/source/changelog.rst | ||
sed -i "/|release|/s/|.*|/${version}${qualifier}/" user_guide_src/source/changelog.rst | ||
sed -i "/Release Date/s/Not Released/$(date +'%B %d, %Y')/" user_guide_src/source/changelog.rst | ||
|
||
#--------------------------------------------------- | ||
# Setup the distribution folders | ||
|
||
if [ -d dist ]; then | ||
rm -rf dist/ | ||
fi | ||
mkdir dist | ||
|
||
if [ -d build ]; then | ||
rm -rf build/ | ||
fi | ||
mkdir build | ||
|
||
#--------------------------------------------------- | ||
# Generate the user guide | ||
echo -e "${BOLD}Generate the user guide${NORMAL}" | ||
|
||
cd user_guide_src | ||
|
||
# make the UG | ||
rm -rf build/* | ||
make html | ||
make epub | ||
|
||
cd .. | ||
|
||
mv user_guide_src/build/html build/docs | ||
|
||
#--------------------------------------------------- | ||
# And finally, get ready for merging | ||
git add . | ||
git commit -m "Release ${version}${qualifier}" | ||
|
||
#--------------------------------------------------- | ||
# Hide stuff from the release bundle | ||
echo -e "${BOLD}Build the distributables${NORMAL}" | ||
|
||
for f in $releasable; do | ||
cp -r $f build/ | ||
done | ||
for f in $release_empty; do | ||
mkdir build/$f | ||
done | ||
|
||
# add the docs | ||
mv user_guide_src/build/epub/CodeIgniter4.epub dist/CodeIgniter-${version}${qualifier}.epub | ||
|
||
cd build | ||
zip -r ../dist/v${version}${qualifier}.zip * | ||
tar -zcf ../dist/v${version}${qualifier}.tar.gz * | ||
|
||
#--------------------------------------------------- | ||
# Done for now | ||
echo -e "${BOLD}Your $branch branch is ready to inspect.${NORMAL}" | ||
echo -e "${BOLD}Follow the directions in release.md to continue.${NORMAL}" |
Oops, something went wrong.