Skip to content

Commit

Permalink
Merge branch 'develop' into db_indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles authored Nov 12, 2018
2 parents 6c07a68 + e2e7193 commit d584037
Show file tree
Hide file tree
Showing 430 changed files with 17,227 additions and 13,341 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CodeIgniter 4 Development

[![Build Status](https://travis-ci.org/bcit-ci/CodeIgniter4.svg?branch=develop)](https://travis-ci.org/bcit-ci/CodeIgniter4)
[![Coverage Status](https://coveralls.io/repos/github/bcit-ci/CodeIgniter4/badge.svg?branch=develop)](https://coveralls.io/github/bcit-ci/CodeIgniter4?branch=develop)
[![Build Status](https://travis-ci.org/codeigniter4/CodeIgniter4.svg?branch=develop)](https://travis-ci.org/codeigniter4/CodeIgniter4)
[![Coverage Status](https://coveralls.io/repos/github/codeigniter4/CodeIgniter4/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4/CodeIgniter4?branch=develop)
<br>

## What is CodeIgniter?
Expand All @@ -18,7 +18,9 @@ More information about the plans for version 4 can be found in [the announcement

### Documentation

The current documentation can be found [here](https://bcit-ci.github.io/CodeIgniter4/). As with the rest of the framework, it is currently a work in progress, and will see changes over time to structure, explanations, etc.
The current in-progress documentation can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
As with the rest of the framework, it is currently a work in progress, and will see changes over time to structure, explanations, etc.


## Important Change with index.php

Expand Down Expand Up @@ -63,7 +65,7 @@ if you want to take the lead for one of them.

We are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!

Please read the [*Contributing to CodeIgniter*](https://github.com/bcit-ci/CodeIgniter4/blob/develop/contributing.md) section in the user guide
Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing.md) section in the user guide

## Server Requirements
PHP version 7.1 or higher is required, with the following extensions installed:
Expand Down
76 changes: 73 additions & 3 deletions admin/README.md
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).
4 changes: 2 additions & 2 deletions admin/docbot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Rebuild and deploy CodeIgniter4 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
Expand Down Expand Up @@ -33,4 +33,4 @@ if [ $1 = "deploy" ]; then
git add .
git commit -S -m "Docbot synching"
git push -f origin gh-pages
fi
fi
4 changes: 2 additions & 2 deletions admin/docbot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Builds & deploys user guide.

The CI4 user guide, warts & all, is rebuilt in a nested
The in-progress 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/).
version of the [User Guide](https://codeigniter4.github.io/CodeIgniter4/).

## Audience

Expand Down
5 changes: 3 additions & 2 deletions admin/post_release
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#~/bin/bash
#!/bin/bash
#######################DO NOT USE YET########################

## Cleanup after a framework release

UPSTREAM=https://github.com/bcit-ci/CodeIgniter4.git
UPSTREAM=https://github.comcodeigniter4/CodeIgniter4.git
version=4
qualifier=

Expand Down
135 changes: 135 additions & 0 deletions admin/pre-release
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}"
Loading

0 comments on commit d584037

Please sign in to comment.