Skip to content

Commit a61c7fd

Browse files
committed
Tease apart the release scripts
1 parent 1e3f32d commit a61c7fd

12 files changed

Lines changed: 253 additions & 71 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
99
More information can be found at the [official site](http://codeigniter.com).
1010

11-
This repository holds the pre-alpha code for CodeIgniter 4 only.
11+
This repository holds the alpha code for CodeIgniter 4 only.
1212
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
1313
while still keeping as many of the things intact that has made people love the framework over the years.
1414

admin/codeigniter4/user_guide_src/source/changelogs/next.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

admin/framework/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# CodeIgniter 4 Framework
2+
3+
## What is CodeIgniter?
4+
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
5+
More information can be found at the [official site](http://codeigniter.com).
6+
7+
This repository holds the distributable version of the framework,
8+
including the user guide. It has been built from the
9+
[development repository](https://github.com/codeigniter4/CodeIgniter4).
10+
11+
**This is pre-release code and should not be used in production sites.**
12+
13+
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
14+
15+
The user guide corresponding to this version of the framework can be found
16+
[here](https://codeigniter4.github.io/userguide/).
17+
18+
19+
## Important Change with index.php
20+
21+
`index.php` is no longer in the root of the project! It has been moved inside the *public* folder,
22+
for better security and separation of components.
23+
24+
This means that you should configure your web server to "point" to your project's *public* folder, and
25+
not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter *public/...*, as the rest of your logic and the
26+
framework are exposed.
27+
28+
**Please** read the user guide for a better explanation of how CI4 works!
29+
The user guide updating and deployment is a bit awkward at the moment, but we are working on it!
30+
31+
## Repository Management
32+
We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
33+
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
34+
FEATURE REQUESTS.
35+
36+
If you raise an issue here that pertains to support or a feature request, it will
37+
be closed! If you are not sure if you have found a bug, raise a thread on the forum first -
38+
someone else may have encountered the same thing.
39+
40+
Before raising a new Github issue, please check that your bug hasn't already
41+
been reported or fixed.
42+
43+
We use pull requests (PRs) for CONTRIBUTIONS to the repository.
44+
We are looking for contributions that address one of the reported bugs or
45+
approved work packages.
46+
47+
Do not use a PR as a form of feature request.
48+
Unsolicited contributions will only be considered if they fit nicely
49+
into the framework roadmap.
50+
Remember that some components that were part of CodeIgniter 3 are being moved
51+
to optional packages, with their own repository.
52+
53+
## Contributing
54+
We welcome contributions from the community.
55+
56+
Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing.md) section in the development repository.
57+
58+
## Server Requirements
59+
PHP version 7.1 or higher is required, with the following extensions installed:
60+
61+
- [intl](http://php.net/manual/en/intl.requirements.php)
62+
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
63+
64+
Additionally, make sure that the following extensions are enabled in your PHP:
65+
66+
- json (enabled by default - don't turn it off)
67+
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
68+
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php)
69+
- xml (enabled by default - don't turn it off)

admin/framework/phpunit.xml.dist

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="tests/_support/_bootstrap.php"
3+
backupGlobals="false"
4+
colors="true"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
stopOnError="false"
9+
stopOnFailure="false"
10+
stopOnIncomplete="false"
11+
stopOnSkipped="false">
12+
<testsuites>
13+
<testsuite name="app">
14+
<directory>./tests</directory>
15+
<exclude>./tests/system</exclude>
16+
</testsuite>
17+
</testsuites>
18+
19+
<filter>
20+
<whitelist processUncoveredFilesFromWhitelist="true">
21+
<directory suffix=".php">./system</directory>
22+
<exclude>
23+
<directory>./system</directory>
24+
</exclude>
25+
</whitelist>
26+
</filter>
27+
28+
</phpunit>

admin/release

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@ make epub
105105

106106
cd ${CI_DIR}
107107

108+
# add changelog preamble
109+
sed '5 i Version |version|
110+
====================================================
111+
112+
Release Date: Not Released
113+
114+
**Next release of CodeIgniter4**
115+
116+
117+
:doc:`See all the changes. </changelogs/next>`
118+
119+
' ${TARGET}/user_guide_src/changelogs/index.rst
120+
108121
#---------------------------------------------------
109122
# Build the distributables
110123

admin/release-appstarter

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# Setup variables
66
. admin/release-config
77
TARGET=dist/appstarter
8+
git checkout $branch
89

10+
#---------------------------------------------------
911
echo -e "${BOLD}Build the framework distributable${NORMAL}"
1012

1113
echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
@@ -23,8 +25,12 @@ done
2325
echo -e "${BOLD}Override as needed...${NORMAL}"
2426
cp -rf admin/starter/* ${TARGET}/
2527

28+
echo -e "${BOLD}Fix paths...${NORMAL}"
29+
sed -i "/public $systemDirectory = 'system';/s/'system'/'vendor/codeigniter4/framework/system'/" application/Config/Paths.php
30+
2631
#---------------------------------------------------
2732
# And finally, get ready for merging
33+
echo -e "${BOLD}Assemble the pieces...${NORMAL}"
2834
cd $TARGET
2935
git add .
3036
git commit -S -m "Release ${RELEASE}"

admin/release-framework

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# Setup variables
66
. admin/release-config
77
TARGET=dist/framework
8+
git checkout $branch
89

10+
#---------------------------------------------------
911
echo -e "${BOLD}Build the framework distributable${NORMAL}"
1012

1113
echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
@@ -23,12 +25,13 @@ done
2325
echo -e "${BOLD}Override as needed...${NORMAL}"
2426
cp -rf admin/framework/* ${TARGET}/
2527

26-
# add the docs
28+
echo -e "${BOLD}Bundle the docs...${NORMAL}"
2729
rm -rf ${TARGET}/docs
2830
cp -rf user_guide_src/build/html ${TARGET}/docs
2931

3032
#---------------------------------------------------
3133
# And finally, get ready for merging
34+
echo -e "${BOLD}Assemble the pieces...${NORMAL}"
3235
cd $TARGET
3336
git add .
3437
git commit -S -m "Release ${RELEASE}"

admin/release-userguide

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,17 @@
55
# Setup variables
66
. admin/release-config
77
TARGET=dist/userguide
8+
git checkout $branch
89

10+
#---------------------------------------------------
911
echo -e "${BOLD}Build the user guide distributable${NORMAL}"
1012

11-
echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
12-
releasable='application public writable README.md contributing.md env license.txt spark'
13-
for fff in $releasable
14-
if [ -d $fff ]; then
15-
rm -rf ${TARGET}/$fff
16-
cp -rf $fff ${TARGET}/
17-
else
18-
rm ${TARGET}/$fff
19-
cp -f $fff ${TARGET}/
20-
fi
21-
done
22-
23-
echo -e "${BOLD}Override as needed...${NORMAL}"
24-
cp -rf admin/appstarter/* ${TARGET}/
2513
cp -rf user_guide_src/build/html ${TARGET}/docs
14+
cp -rf user_guide_src/build/epub/* ${TARGET}/
2615

2716
#---------------------------------------------------
2817
# And finally, get ready for merging
18+
echo -e "${BOLD}Assemble the pieces...${NORMAL}"
2919
cd $TARGET
3020
git add .
3121
git commit -S -m "Release ${RELEASE}"

admin/starter/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CodeIgniter 4 Application Starter
2+
3+
## What is CodeIgniter?
4+
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
5+
More information can be found at the [official site](http://codeigniter.com).
6+
7+
This repository holds a composer-installable app starter.
8+
It has been built from the
9+
[development repository](https://github.com/codeigniter4/CodeIgniter4).
10+
11+
**This is pre-release code and should not be used in production sites.**
12+
13+
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
14+
15+
The user guide corresponding to this version of the framework can be found
16+
[here](https://codeigniter4.github.io/userguide/).
17+
18+
##Installation & updates
19+
20+
`composer create-project codeigniter4/appstarter` then `composer update` whenever
21+
there is a new release of the framework.
22+
23+
##Setup
24+
25+
Copy `env` to `.env` and tailor for your app, specifically the baseURL
26+
and any database settings.
27+
28+
## Important Change with index.php
29+
30+
`index.php` is no longer in the root of the project! It has been moved inside the *public* folder,
31+
for better security and separation of components.
32+
33+
This means that you should configure your web server to "point" to your project's *public* folder, and
34+
not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter *public/...*, as the rest of your logic and the
35+
framework are exposed.
36+
37+
**Please** read the user guide for a better explanation of how CI4 works!
38+
The user guide updating and deployment is a bit awkward at the moment, but we are working on it!
39+
40+
## Server Requirements
41+
PHP version 7.1 or higher is required, with the following extensions installed:
42+
43+
- [intl](http://php.net/manual/en/intl.requirements.php)
44+
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
45+
46+
Additionally, make sure that the following extensions are enabled in your PHP:
47+
48+
- json (enabled by default - don't turn it off)
49+
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
50+
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php)
51+
- xml (enabled by default - don't turn it off)

admin/starter/composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,25 @@
66
"license": "MIT",
77
"require": {
88
"php": ">=7.1",
9-
"ext-curl": "*",
9+
"codeigniter4/framework": "^4",
10+
"ext-curl": "*",
1011
"ext-intl": "*",
1112
"kint-php/kint": "^2.1",
1213
"zendframework/zend-escaper": "^2.5"
1314
},
1415
"require-dev": {
15-
"mikey179/vfsStream": "1.6.*",
16-
"phpunit/phpunit": "^7.0",
17-
"squizlabs/php_codesniffer": "^3.3"
16+
"mikey179/vfsStream": "1.6.*",
17+
"phpunit/phpunit": "^7.0"
1818
},
1919
"autoload": {
2020
"psr-4": {
21-
"CodeIgniter\\": "system/",
22-
"Psr\\Log\\": "system/ThirdParty/PSR/Log/"
21+
"CodeIgniter\\": "vendor/codeigniter4/framework/system/",
22+
"Psr\\Log\\": "vendor/codeigniter4/framework/system/ThirdParty/PSR/Log/"
2323
}
2424
},
2525
"scripts": {
2626
"post-update-cmd": [
27-
"composer dump-autoload",
28-
"CodeIgniter\\ComposerScripts::postUpdate"
27+
"composer dump-autoload"
2928
]
3029
},
3130
"support": {

0 commit comments

Comments
 (0)