aboutsummaryrefslogtreecommitdiff
path: root/docs/en/developers
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-15 00:00:25 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-15 00:00:25 +0100
commit1c3159058fd256ec7163a29c9865dbd3dbe05f17 (patch)
tree5b3a9df3cc709a4b370f6f03cf79c50483275344 /docs/en/developers
parent769f34e958b50e748acf6a151805f4a255df2043 (diff)
Quick update the doc for master renaming to edge
Diffstat (limited to 'docs/en/developers')
-rw-r--r--docs/en/developers/02_First_steps.md36
-rw-r--r--docs/en/developers/02_Github.md22
-rw-r--r--docs/en/developers/03_Running_tests.md18
-rw-r--r--docs/en/developers/04_Frontend/02_Design.md14
-rw-r--r--docs/en/developers/04_Pull_requests.md32
-rw-r--r--docs/en/developers/05_Release_new_version.md26
6 files changed, 80 insertions, 68 deletions
diff --git a/docs/en/developers/02_First_steps.md b/docs/en/developers/02_First_steps.md
index 7b3a4c11f..21456fea4 100644
--- a/docs/en/developers/02_First_steps.md
+++ b/docs/en/developers/02_First_steps.md
@@ -12,17 +12,17 @@ First, you need to install [Docker](https://docs.docker.com/install/linux/docker
Once you're done, clone the repository with:
-```console
-$ git clone https://github.com/FreshRSS/FreshRSS.git
-$ cd FreshRSS
+```sh
+git clone https://github.com/FreshRSS/FreshRSS.git
+cd FreshRSS
```
Note that, if you want to contribute, you have to fork the repository first and clone your fork instead of the "root" one. Adapt the commands in consequence.
Then, the only command you need to know is the following:
-```console
-$ make start
+```sh
+make start
```
This might take some time while Docker downloads the image. If your user isn't in the `docker` group, you'll need to prepend the command with `sudo`.
@@ -31,39 +31,39 @@ This might take some time while Docker downloads the image. If your user isn't i
You can stop the containers by typing <kbd>Control</kbd> + <kbd>c</kbd> or with the following command, in another terminal:
-```console
-$ make stop
+```sh
+make stop
```
If you're interested in the configuration, the `make` commands are defined in the [`Makefile`](/Makefile).
If you need to use a different tag image (default is `alpine`), you can set the `TAG` environment variable:
-```console
-$ TAG=arm make start
+```sh
+TAG=arm make start
```
You can find the full list of available tags [on the Docker hub](https://hub.docker.com/r/freshrss/freshrss/tags).
If you want to build the Docker image yourself, you can use the following command:
-```console
-$ make build
-$ # or
-$ TAG=arm make build
+```sh
+make build
+# or
+TAG=arm make build
```
The `TAG` variable can be anything (e.g. `local`). You can target a specific architecture by adding `-alpine` or `-arm` at the end of the tag (e.g. `local-arm`).
-# Project architecture
+## Project architecture
- the PHP framework: [Minz](Minz/index.md)
-# Extensions
+## Extensions
If you want to create your own FreshRSS extension, take a look at the [extension documentation](03_Backend/05_Extensions.md).
-# Coding style
+## Coding style
If you want to contribute to the source code, it's important to follow the project's coding style. The actual code doesn't always follow it throughout the project, but we should fix it every time an opportunity presents itself.
@@ -72,6 +72,7 @@ Contributions which don't follow the coding style will be rejected as long as th
## Spaces, tabs and other whitespace characters
### Indentation
+
Code indentation must use tabs.
### Alignment
@@ -89,7 +90,7 @@ The newline character must be a line feed (LF), which is the default line ending
You can verify if there is any unintended white space at the end of line with the following Git command:
-```bash
+```sh
# command to check files before adding them in the Git index
git diff --check
# command to check files after adding them in the Git index
@@ -208,6 +209,7 @@ Please ensure that your code works with the oldest PHP version officially suppor
## Miscellaneous
### Operators
+
Operators must be at the end of the line if a condition is split over more than one line.
```php
diff --git a/docs/en/developers/02_Github.md b/docs/en/developers/02_Github.md
index 953785d4f..7a7769caa 100644
--- a/docs/en/developers/02_Github.md
+++ b/docs/en/developers/02_Github.md
@@ -1,6 +1,7 @@
# Branching
## Basic
+
If you are new to Git, here are some of the resources you might find useful:
* [GitHub's blog post](https://github.com/blog/120-new-to-git)
@@ -9,30 +10,35 @@ If you are new to Git, here are some of the resources you might find useful:
* <http://rogerdudler.github.io/git-guide/>
## Getting the latest code from the FreshRSS repository
+
First you need to add the official repo to your remote repo list:
-```bash
+
+```sh
git remote add upstream git@github.com:FreshRSS/FreshRSS.git
```
You can verify the remote repo is successfully added by using:
-```bash
+
+```sh
git remote -v show
```
Now you can pull the latest development code:
-```bash
-git checkout master
-git pull upstream master
+
+```sh
+git checkout edge
+git pull upstream edge
```
## Starting a new development branch
-```bash
+
+```sh
git checkout -b my-development-branch
```
-# Sending a patch
+## Sending a patch
-```bash
+```sh
# Add the changed file, here actualize_script.php
git add app/actualize_script.php
# Commit the change and write a proper commit message
diff --git a/docs/en/developers/03_Running_tests.md b/docs/en/developers/03_Running_tests.md
index 666df0412..24d80fe9a 100644
--- a/docs/en/developers/03_Running_tests.md
+++ b/docs/en/developers/03_Running_tests.md
@@ -1,28 +1,28 @@
# Running tests
-FreshRSS is tested with [PHPUnit](https://phpunit.de/). No code should be merged in `master` if the tests don't pass.
+FreshRSS is tested with [PHPUnit](https://phpunit.de/). No code should be merged in `edge` if the tests don’t pass.
## Locally
As a developer, you can run the test suite on your PC easily with `make` commands. You can run the test suite with:
-```console
-$ make test
+```sh
+make test
```
This command downloads the PHPUnit binary and verifies its checksum. If the verification fails, the file is deleted. In this case, you should [open an issue on GitHub](https://github.com/FreshRSS/FreshRSS/issues/new) to let maintainers know about the problem.
Then, it executes PHPUnit in a Docker container. If you don't use Docker, you can run the command directly with:
-```console
-$ NO_DOCKER=true make test
+```sh
+NO_DOCKER=true make test
```
The linter can be run with a `make` command as well:
-```console
-$ make lint # to execute the linter on the PHP files
-$ make lint-fix # or, to fix the errors detected by the linter
+```sh
+make lint # to execute the linter on the PHP files
+make lint-fix # or, to fix the errors detected by the linter
```
Similarly to PHPUnit, it downloads a [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) binary (i.e. `phpcs` or `phpcbf` depending on the command) and verifies its checksum.
@@ -31,4 +31,4 @@ Similarly to PHPUnit, it downloads a [PHP\_CodeSniffer](https://github.com/squiz
Tests are automatically run when you open a pull request on GitHub. It is done with [Travis CI](https://travis-ci.org/FreshRSS/FreshRSS/). This is done to ensure there is no regressions in your code. We cannot merge a PR if the tests fail so we'll ask you to fix bugs before to review your code.
-If you're interested in, you can take a look at [the configuration file](https://github.com/FreshRSS/FreshRSS/blob/master/.travis.yml).
+If you're interested in, you can take a look at [the configuration file](https://github.com/FreshRSS/FreshRSS/blob/edge/.travis.yml).
diff --git a/docs/en/developers/04_Frontend/02_Design.md b/docs/en/developers/04_Frontend/02_Design.md
index 625fede28..74b92dee2 100644
--- a/docs/en/developers/04_Frontend/02_Design.md
+++ b/docs/en/developers/04_Frontend/02_Design.md
@@ -4,7 +4,8 @@
**As of writing (02-02-2021), support for themes as extensions is under development.**
-The easiest way to create a theme is by copying and modifying the base theme (or another of the pre-installed themes). The base theme can be found in [/p/themes/base-theme](https://github.com/FreshRSS/FreshRSS/tree/master/p/themes/base-theme). Themes require:
+The easiest way to create a theme is by copying and modifying the base theme (or another of the pre-installed themes). The base theme can be found in [/p/themes/base-theme](https://github.com/FreshRSS/FreshRSS/tree/edge/p/themes/base-theme). Themes require:
+
- a **metadata.json** file to describe the theme.
- a **loader.gif** file to use as a loading icon (assuming .loading's background has not been overridden)
- an **icons** folder containing .svg, .ico, and .png files to override existing icons
@@ -16,14 +17,15 @@ The easiest way to create a theme is by copying and modifying the base theme (or
RTL (right-to-left) support for languages such as Hebrew and Arabic is handled through CSSJanus. To generate an RTL CSS file from your standard file, use `make rtl`. Be sure to commit the resulting file (filename.rtl.css).
-# Overriding icons
+## Overriding icons
To replace the default icons, add an "icons" folder to your theme's folder. Use files with the same name as the default icon to override them.
-# Template file
+## Template file
-metadata.json
-```
+`metadata.json`
+
+```json
{
"name": "Theme name",
"author": "Theme author",
@@ -33,4 +35,4 @@ metadata.json
}
```
-An example of a css theme file can be found at [/p/themes/base-theme/base.css](https://github.com/FreshRSS/FreshRSS/blob/master/p/themes/base-theme/base.css)
+An example of a css theme file can be found at [/p/themes/base-theme/base.css](https://github.com/FreshRSS/FreshRSS/blob/edge/p/themes/base-theme/base.css)
diff --git a/docs/en/developers/04_Pull_requests.md b/docs/en/developers/04_Pull_requests.md
index a648616bf..6f5bab655 100644
--- a/docs/en/developers/04_Pull_requests.md
+++ b/docs/en/developers/04_Pull_requests.md
@@ -2,11 +2,13 @@
So you want to propose a patch to the community? It's time to open a [pull request](https://github.com/FreshRSS/FreshRSS/pulls)!
-When you open a PR, your message will be prefilled with a message based on [a template](https://github.com/FreshRSS/FreshRSS/blob/master/docs/pull_request_template.md). It contains a checklist to make sure you didn't forget anything. It is very important to verify you did everything mentioned so documentation is up-to-date, the commit history stays clear and the code is always stable.
+When you open a PR, your message will be prefilled with a message based on [a template](https://github.com/FreshRSS/FreshRSS/blob/edge/docs/pull_request_template.md). It contains a checklist to make sure you didn't forget anything. It is very important to verify you did everything mentioned so documentation is up-to-date, the commit history stays clear and the code is always stable.
The rest of this document explains specific points.
-## How to rebase your branch on `master`
+## How to rebase your branch on `edge`
+
+**TODO:** Update this section. With GitHub’s *squash and merge*, rebasing (and other forms of history rewriting) is more dangerous and annoying (e.g. breaking review mechanism) than useful.
Rebasing a branch is useful to make sure your code is based on the most recent version of FreshRSS and there are no conflicts. You have two ways to do that.
@@ -20,26 +22,26 @@ Note that you should never rebase a branch if someone else is working on it. Oth
To rebase a branch:
-```console
-$ git checkout master # go on master branch
-$ git pull upstream master # pull the last version of master
-$ git checkout - # go back to your branch
-$ git rebase master # rebase your branch on master
+```sh
+git checkout edge # go on edge branch
+git pull upstream edge # pull the last version of edge
+git checkout - # go back to your branch
+git rebase edge # rebase your branch on edge
```
-If you feel confident, you can use `git rebase -i master` to rewrite your history and make it clearer.
+If you feel confident, you can use `git rebase -i edge` to rewrite your history and make it clearer.
### Merging
-If you prefer, you can simply merge `master` into your own branch. Conflicts might be easier to resolve, but your Git history will be less readable. Don't worry, we'll take care of it before merging your PR back into `master`.
+If you prefer, you can simply merge `edge` into your own branch. Conflicts might be easier to resolve, but your Git history will be less readable. Don't worry, we'll take care of it before merging your PR back into `edge`.
-To merge `master`:
+To merge `edge`:
-```console
-$ git checkout master # go on master branch
-$ git pull upstream master # pull the last version of master
-$ git checkout - # go back to your branch
-$ git merge master # merge master into your branch
+```sh
+git checkout edge # go on edge branch
+git pull upstream edge # pull the last version of edge
+git checkout - # go back to your branch
+git merge edge # merge edge into your branch
```
## How to write a Git commit message
diff --git a/docs/en/developers/05_Release_new_version.md b/docs/en/developers/05_Release_new_version.md
index 0cb296d0c..f4e38d0de 100644
--- a/docs/en/developers/05_Release_new_version.md
+++ b/docs/en/developers/05_Release_new_version.md
@@ -4,16 +4,16 @@ In order to get as much feedback as possible before a release, it's preferable t
It's also recommended to make the announcement on mailing@freshrss.org.
-# Check the dev status
+## Check the dev status
Before releasing a new version of FreshRSS, you must ensure that the code is stable and free of major bugs. Ideally, our tests should be automated and executed before any publication.
You must also **make sure that the CHANGELOG file is up to date** with the updates of the version to be released.
-# Git process
+## Git process
-```bash
-$ git checkout master
+```sh
+$ git checkout edge
$ git pull
$ vim constants.php
# Update version number x.y.y.z of FRESHRSS_VERSION
@@ -24,15 +24,15 @@ Version x.y.z
$ git push && git push --tags
```
-# Updating `update.freshrss.org`
+## Updating `update.freshrss.org`
It's important to update update.freshrss.org since this is the default service for automatic FreshRSS updates.
-The repository managing the code is located on GitHub: [FreshRSS/update.freshrss.org] (https://github.com/FreshRSS/update.freshrss.org/).
+The repository managing the code is located on GitHub: [FreshRSS/update.freshrss.org](https://github.com/FreshRSS/update.freshrss.org/).
## Writing the update script
-The scripts are located in the `./scripts/` directory and must take the form `update_to_x.y.z.z.php`. This directory also contains `update_to_dev.php` intended for updates of the `master` branch (this script must not include code specific to a particular version!) and `update_util.php`, which contains a list of functions useful for all scripts.
+The scripts are located in the `./scripts/` directory and must take the form `update_to_x.y.z.z.php`. This directory also contains `update_to_dev.php` intended for updates of the `edge` branch (this script must not include code specific to a particular version!) and `update_util.php`, which contains a list of functions useful for all scripts.
In order to write a new script, it's better to copy/paste the last version or to start from `update_to_dev.php`. The first thing to do is to define the URL from which the FreshRSS package will be downloaded (`PACKAGE_URL`). The URL is in the form of `https://codeload.github.com/FreshRSS/FreshRSS/zip/x.y.z`.
@@ -67,7 +67,7 @@ return array(
And here's how this table works:
* on the left you can find the N version, on the right the N+1 version;
-* the `x.y.z.z-dev` versions are **all** updated to `master`;
+* the `x.y.z.z-dev` versions are **all** updated to `edge`;
* stable versions are updated to stable versions;
* it's possible to skip several versions at once, provided that the update scripts support it;
* it's advisable to indicate the correspondence of the current version to its potential future version by specifying that this version does not yet exist. As long as the corresponding script does not exist, nothing will happen.
@@ -80,14 +80,14 @@ Before updating update.freshrss.org, it's better to test with dev.update.freshrs
When you're satisfied, update update.freshrss.org with the new script, test it again, and then move on.
-# Updating the FreshRSS services
+## Updating the FreshRSS services
Two services need to be updated immediately after the update.
* rss.freshrss.org;
* demo.freshrss.org (public login: `demo` / `demodemo`).
-# Publicly announce the release
+## Publicly announce the release
When everything's working, it's time to announce the release to the world!
@@ -96,10 +96,10 @@ When everything's working, it's time to announce the release to the world!
* on Twitter ([@FreshRSS](https://twitter.com/FreshRSS) account)
* and on mailing@freshrss.org
-# Starting the next development version
+## Starting the next development version
-```bash
-$ git checkout master
+```sh
+$ git checkout edge
$ vim constants.php
# Update the FRESHRSS_VERSION
$ vim CHANGELOG.md