mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Compare commits
3 Commits
hregis-fix
...
15.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32f160355b | ||
|
|
30ecf80732 | ||
|
|
5fa475a074 |
@@ -4,9 +4,10 @@ languages:
|
||||
JavaScript: true
|
||||
PHP: true
|
||||
engines:
|
||||
phpcodesniffer: true
|
||||
phpcodesniffer: true
|
||||
exclude_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
- 'htdocs/includes/*'
|
||||
@@ -22,11 +22,3 @@ indent_style = tab
|
||||
indent_style = tab
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
[*.sql]
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -3,7 +3,7 @@
|
||||
* text=auto
|
||||
|
||||
|
||||
# Explicitly declare text files we want to always be normalized and converted
|
||||
# Explicitly declare text files we want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.php text eol=lf
|
||||
*.pl text eol=lf
|
||||
@@ -21,7 +21,6 @@
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.neon text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
|
||||
125
.github/CONTRIBUTING.md
vendored
125
.github/CONTRIBUTING.md
vendored
@@ -1,93 +1,54 @@
|
||||
How to contribute to Dolibarr
|
||||
=============================
|
||||
|
||||
Submit a Bug report or a Feature request
|
||||
---------------------------------------
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
|
||||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.**
|
||||
If you have questions about Dolibarr or need help on using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
|
||||
Issues to inform about a bug or a development trouble and requests for a new feature, are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is English**. So please prepare your contributions in English (we recommend using an online translation service if you don't speak English).
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is english**. So please prepare your contributions in english.
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if anyone else has already reported your issue.
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
|
||||
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before submitting.**
|
||||
6. **Check your Message at Preview before sending.**
|
||||
|
||||
|
||||
|
||||
<a name="code"></a>
|
||||
|
||||
Submit code
|
||||
<a name="code"></a>Code
|
||||
---------------------
|
||||
|
||||
This process describes how a Developer can submit code to the project so it can be analyzed and validated by the PR Maintainer (we call this a Pull Request).
|
||||
|
||||
Definition:
|
||||
- Developer: is the human knowing the development language of the application that wants to change some part of the code by modifying the sources of the project.
|
||||
- PR Maintainer: is the human knowing the development language and code who checks that the code submitted for approbation is correct to validate it, in other words, the PR Maintainer is the approbator of commits.
|
||||
- Release Maintainer: is the human that validates that a freeze/beta version is ok to be released officially as a stable version.
|
||||
|
||||
|
||||
### Basic workflow
|
||||
|
||||
As the Developer:
|
||||
|
||||
1. Check you agree with the terms of the [DCO - Developer's Certificate of Origin](https://github.com/Dolibarr/dolibarr/blob/develop/DCO)
|
||||
2. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
3. Clone your fork.
|
||||
4. Choose a branch(See the [Branches](#branches) section below).
|
||||
5. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
6. Commit and push your changes.
|
||||
7. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
As the PR Maintainer:
|
||||
|
||||
7. The PR Maintainer will check and decide if he approves or not the commits. During this step, the PR Maintainer can modify your own code to make it valid for approbation or ask you to make the change yourself. For this the PR Maintainer may add commits to a PR. Depending on the tools used (can be done from github directly or from an IDE), such commits may be done directly after validating your PR (for example to complete it).
|
||||
|
||||
As the Release Maintainer:
|
||||
|
||||
8. A tag will be added to take a snapshot of the code with all the changes approved by PR Maintainers, when ready to do a release.
|
||||
|
||||
|
||||
Note: Project leader(Master Yoda and BDFL) retains all above roles and can directly commit to the project without a PR. Of course anyone can check commit history and comment!
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
5. Commit and push your changes.
|
||||
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
<span id="branches" name="branches"></span>
|
||||
|
||||
### Branches
|
||||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
If you're fixing a bug, it is preferred that you make a pull request against the oldest version affected.
|
||||
|
||||
We recommend to push it into N - 2 where N is the latest version available, if not possible into version N - 1, and finally into develop.
|
||||
|
||||
The rule N - 2 is just a tip if you don't know which version to choose to get the best compromise between ease of correction and number of potential beneficiaries of the correction.
|
||||
|
||||
If you push a bug fix on a very old version it is still going to be merged and propagated into newer versions(choose wisely because old versions depend on old deprecated/unsupported versions of PHP and external libraries).
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it
|
||||
against the oldest version affected that's still supported.
|
||||
|
||||
We officially support versions N, N − 1 and N − 2 for N the latest version available.
|
||||
|
||||
Choose your base branch accordingly.
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
|
||||
|
||||
- As the Developer, please don't edit the ChangeLog file. This file is generated from all commit messages during the release process by the Project releaser.
|
||||
|
||||
- As the Developer: Do not submit changes into files xx_XX/afile.lang. They are language files and are updated/synced automatically from Transifex. If you need to add a new language file, just add it for the en_US language.
|
||||
|
||||
- As the Release Maintainer: The Release Maintainer will decide to make a new release as soon as the planning of the release is reached and the code in the branch to release reach the status of "No more known serious bugs".
|
||||
|
||||
|
||||
<a name="commits"></a>
|
||||
|
||||
### Commits
|
||||
|
||||
### <a name="commits"></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
```plaintext
|
||||
```
|
||||
[KEYWORD] [ISSUENUM] DESC
|
||||
|
||||
LONGDESC
|
||||
@@ -105,13 +66,10 @@ where
|
||||
#### Keyword
|
||||
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
|
||||
|
||||
The keyword can be omitted if your commit does not fit in any of the following categories:
|
||||
|
||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||
- Fix/FIX: for a bug fix
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
- Close/CLOSE: for closing a referenced feature request
|
||||
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
|
||||
- Perf/PERF: for a performance enhancement
|
||||
- Qual/QUAL: for quality code enhancement or re-engineering
|
||||
|
||||
#### Issuenum
|
||||
If your commit fixes a referenced bug or feature request.
|
||||
@@ -132,52 +90,47 @@ Feel free to express technical details, use cases or anything relevant to the cu
|
||||
|
||||
This section can span multiple lines.
|
||||
|
||||
If your PR is a change on interface, you must also paste a screenshot showing the new screen.
|
||||
Try to keep lines under 120 characters.
|
||||
|
||||
#### Examples
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
or
|
||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #xxx)
|
||||
or
|
||||
Short description (when the commit is not introducing a feature nor closing a bug)
|
||||
Short description (when the commit is not introducing feature nor closing a bug)
|
||||
|
||||
Long description (Can span across multiple lines).
|
||||
Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
|
||||
### Pull Requests
|
||||
|
||||
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
|
||||
a process to follow to optimize the chance to have PRs merged efficiently...
|
||||
|
||||
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic. For PR on maintenance versions, the modified code must be as low as possible and only the absolutely necessary changes are allowed (You must have the number of lines modified as low as possible to have the visible bug fixed (no refactoring, no perf, no quality, no renaming must be joined). This allow to reduce to the maximum the number of future conflicts (so the number of regressions) when merging fixes into higher version to reduce the time of any future impact analysis.
|
||||
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic.
|
||||
|
||||
* Your Pull Request (PR) must pass the Continuous Integration checks and code quality checks.
|
||||
|
||||
* When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing.
|
||||
|
||||
* A screenshot will be always required for any PR of change/addition of a GUI behavior.
|
||||
|
||||
Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please contact the core project manager first (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
|
||||
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
* if you add a new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
|
||||
Once a PR has been submitted, you may need to wait for its integration. It is common that the project leader let the PR open for a long delay to allow every developer discuss about the PR (A label is added in such a case).
|
||||
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of the PR (but it can be analyzed for discussion).
|
||||
|
||||
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several months later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
|
||||
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explains why your PR has not been integrated yet.
|
||||
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag asks you. The majority of open PRs are waiting an action of the author of the PR.
|
||||
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
|
||||
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
|
||||
|
||||
Statistics on Dolibarr project shows that 95% of submitted PRs are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PRs in Open Source world for a major project. Don't expect the core team to reach 100%.
|
||||
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
|
||||
|
||||
|
||||
### Resources
|
||||
@@ -185,15 +138,15 @@ A so high ratio is very rare on a so popular project and with the increasing pop
|
||||
|
||||
Translations
|
||||
------------
|
||||
The source language (en_US) is maintained in the repository.
|
||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
||||
|
||||
Translations done on transifex are available in the next major release.
|
||||
|
||||
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assumes that if the original source
|
||||
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
|
||||
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
|
||||
to retrieve all old translations of a source text and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
|
||||
|
||||
### Resources
|
||||
|
||||
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -2,4 +2,4 @@
|
||||
|
||||
open_collective: dolibarr
|
||||
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
||||
github: [eldy]
|
||||
github: [eldy]
|
||||
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
35
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us fix something that is broken
|
||||
title: ''
|
||||
labels: Bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Instructions
|
||||
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
- *remove any unused sub-section*
|
||||
|
||||
|
||||
# Bug
|
||||
[*Short description*]
|
||||
|
||||
## Environment
|
||||
- **Version**: [*Affected Dolibarr version(s)*]
|
||||
- **OS**: [*Server OS type and version*]
|
||||
- **Web server**: [*Webserver type and version*]
|
||||
- **PHP**: [*PHP version*]
|
||||
- **Database**: [*Database type and version*]
|
||||
- **URL(s)**: [*Affected URL(s)*]
|
||||
|
||||
## Expected and actual behavior
|
||||
[*Verbose description*]
|
||||
|
||||
## Steps to reproduce the behavior
|
||||
[*Verbose description*]
|
||||
|
||||
## [Attached files](https://help.github.com/articles/issue-attachments) (Screenshots, screencasts, dolibarr.log, debugging informations…)
|
||||
[*Files*]
|
||||
48
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
48
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,48 +0,0 @@
|
||||
name: Bug report
|
||||
description: Create a report to help us fix something that is broken
|
||||
labels: ["Bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
|
||||
|
||||
- type: textarea
|
||||
id: bug
|
||||
attributes:
|
||||
label: Bug
|
||||
description: Please give a short description of the bug
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: environment-version
|
||||
attributes:
|
||||
label: Dolibarr Version
|
||||
description: Affected Dolibarr version(s)
|
||||
placeholder: 19.0, develop, ...
|
||||
|
||||
- type: input
|
||||
id: environment-php
|
||||
attributes:
|
||||
label: Environment PHP
|
||||
description: PHP version
|
||||
|
||||
- type: input
|
||||
id: environment-database
|
||||
attributes:
|
||||
label: Environment Database
|
||||
description: Database type and version
|
||||
|
||||
- type: textarea
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: Steps to reproduce the behavior and expected behavior
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: files
|
||||
attributes:
|
||||
label: Attached files
|
||||
description: Screenshots, screencasts, dolibarr.log, debugging information
|
||||
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a new idea for this project
|
||||
title: ''
|
||||
labels: Feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Instructions
|
||||
*This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
- *remove any unused sub-section*
|
||||
|
||||
|
||||
# Feature Request
|
||||
[*Short description*]
|
||||
|
||||
## Use case
|
||||
[*Verbose description*]
|
||||
|
||||
## Suggested implementation
|
||||
[*Verbose description*]
|
||||
|
||||
## Suggested steps
|
||||
[*List of tasks to achieve goal*]
|
||||
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
35
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,35 +0,0 @@
|
||||
name: Feature request
|
||||
description: Suggest a new idea for this project
|
||||
labels: ["Feature request"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
|
||||
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
attributes:
|
||||
label: Feature Request
|
||||
description: Short description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: use-case
|
||||
attributes:
|
||||
label: Use case
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: suggested-implementation
|
||||
attributes:
|
||||
label: Suggested implementation
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
id: suggested-steps
|
||||
attributes:
|
||||
label: Suggested steps
|
||||
description: List of tasks to achieve goal
|
||||
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,9 +1,8 @@
|
||||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "FIX", "CLOSE", "NEW", "UIUX", PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *only keep the "FIX", "CLOSE" or "NEW" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- ***in particular, in case of a bugfix, please check that you are targetting the branch corresponding to the oldest version in which the bug occurs***
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
|
||||
@@ -17,16 +16,3 @@
|
||||
|
||||
# NEW|New [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# UIUX|Uiux [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# PERF|Perf #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# QUAL|Qual #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
19
.github/dependabot.yml
vendored
19
.github/dependabot.yml
vendored
@@ -1,19 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
allow:
|
||||
# Allow production updates only (can do a AND, several entries are doing a OR)
|
||||
- dependency-type: "production"
|
||||
#- dependency-type: "direct"
|
||||
exclude-paths:
|
||||
- 'dev'
|
||||
- 'tests/acceptance'
|
||||
- 'tests/selenium'
|
||||
86
.github/scripts/get_changed_php.sh
vendored
86
.github/scripts/get_changed_php.sh
vendored
@@ -1,86 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# This script retrieves the list of changed PHP files for a pull request
|
||||
# using the GitHub API and sets two outputs:
|
||||
# - any_changed: "true" if at least one PHP file changed, "false" otherwise
|
||||
# - all_changed_files: space-separated list of changed PHP file paths
|
||||
#
|
||||
# Required environment variables:
|
||||
# GITHUB_TOKEN - GitHub token with repo access
|
||||
# GITHUB_REPOSITORY - "owner/repo"
|
||||
# GITHUB_EVENT_PATH - Path to the event JSON payload
|
||||
|
||||
# Verify required environment variables are set
|
||||
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
|
||||
echo "GITHUB_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${GITHUB_REPOSITORY:-}" ]]; then
|
||||
echo "GITHUB_REPOSITORY is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${GITHUB_EVENT_PATH:-}" ]]; then
|
||||
echo "GITHUB_EVENT_PATH is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the pull request number from the event payload
|
||||
pr_number=$(jq --raw-output '.pull_request.number' "$GITHUB_EVENT_PATH")
|
||||
if [[ "$pr_number" == "null" ]]; then
|
||||
echo "Not a pull request event"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Split repository into owner and repo name
|
||||
# Split repository into owner and repo name using Bash parameter expansion
|
||||
owner="${GITHUB_REPOSITORY%%/*}" # Extract text before the first '/'
|
||||
repo="${GITHUB_REPOSITORY##*/}" # Extract text after the last '/'
|
||||
|
||||
page=1
|
||||
per_page=100
|
||||
changed_php_files=()
|
||||
|
||||
# Loop through all pages to gather changed files
|
||||
while true; do
|
||||
response=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
"https://api.github.com/repos/${owner}/${repo}/pulls/${pr_number}/files?per_page=${per_page}&page=${page}")
|
||||
|
||||
# Filter for files ending with .php and add them to the list
|
||||
mapfile -t files < <(echo "$response" | jq -r '.[] | select(.filename | test("\\.php$")) | .filename')
|
||||
changed_php_files+=("${files[@]}")
|
||||
|
||||
# Check if we have reached the last page (less than per_page results)
|
||||
count=$(echo "$response" | jq 'length')
|
||||
if (( count < per_page )); then
|
||||
break
|
||||
fi
|
||||
((page++))
|
||||
done
|
||||
|
||||
|
||||
# Build a space-separated string of changed PHP files
|
||||
# This does not cope with files that have spaces.
|
||||
# But such files do not exist in the project (at least not for the
|
||||
# files we are filtering).
|
||||
all_changed_files=$(IFS=" " ; echo "${changed_php_files[*]}")
|
||||
|
||||
|
||||
# Determine changed files flag
|
||||
if [ -z "$all_changed_files" ]; then
|
||||
any_changed="false"
|
||||
else
|
||||
any_changed="true"
|
||||
fi
|
||||
|
||||
# Set outputs for GitHub Actions if GITHUB_OUTPUT is available
|
||||
if [ -n "${GITHUB_OUTPUT:-}" ]; then
|
||||
echo "any_changed=${any_changed}" >> "$GITHUB_OUTPUT"
|
||||
echo "all_changed_files=${all_changed_files}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
# Otherwise, print the outputs
|
||||
echo "any_changed=${any_changed}"
|
||||
echo "all_changed_files=${all_changed_files}"
|
||||
fi
|
||||
33
.github/workflows/README.md
vendored
33
.github/workflows/README.md
vendored
@@ -1,33 +0,0 @@
|
||||
# CI Workflows
|
||||
|
||||
The 2 main CI workflows are:
|
||||
----------------------------
|
||||
|
||||
- ci-on-pull_request.yml
|
||||
- ci-on-push.yml
|
||||
|
||||
This run the actions:
|
||||
|
||||
- pre-commit.yml
|
||||
- phan.yml
|
||||
- phpstan.yml
|
||||
When all succeed, start:
|
||||
- Windows-ci;
|
||||
|
||||
See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
|
||||
|
||||
|
||||
The other worklows are:
|
||||
-----------------------
|
||||
|
||||
- ci-stale-issues-safe to autoclose old issues.
|
||||
- ci-phpstan_baseline to update the phpstan baseline file.
|
||||
- ci-cache-clean-pr to clean cache when closing a PR.
|
||||
- ci-test to make CI tests
|
||||
|
||||
Some tests workflows are:
|
||||
------------------------
|
||||
|
||||
- pr-18
|
||||
- pr-18-autolbal
|
||||
- test
|
||||
39
.github/workflows/ci-cache-clean-pr.yml
vendored
39
.github/workflows/ci-cache-clean-pr.yml
vendored
@@ -1,39 +0,0 @@
|
||||
---
|
||||
# This clean the caches of a branch when we close the pull request.
|
||||
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
|
||||
name: Cleanup caches of a closed branch
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# `actions:write` permission is required to delete caches
|
||||
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
|
||||
actions: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Cleanup
|
||||
run: |
|
||||
gh extension install actions/gh-actions-cache
|
||||
REPO="${{ github.repository }}"
|
||||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
|
||||
echo "Fetching list of cache key"
|
||||
cacheKeysForPR=$(gh actions-cache list -R "$REPO" -B "$BRANCH" | cut -f 1 )
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in $cacheKeysForPR
|
||||
do
|
||||
gh actions-cache delete "$cacheKey" -R "$REPO" -B "$BRANCH" --confirm
|
||||
done
|
||||
echo "Done"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
42
.github/workflows/ci-on-pull_request.yml
vendored
42
.github/workflows/ci-on-pull_request.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: "CI-PULL-REQUEST"
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
uses: ./.github/workflows/pre-commit.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
#windows-ci:
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# secrets: inherit
|
||||
# uses: ./.github/workflows/windows-ci.yml
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
#gh-travis: # Runs travis script on github runner (not on travis)
|
||||
# if: false
|
||||
# # needs: [pre-commit, phan]
|
||||
# # needs: [windows-ci]
|
||||
# secrets: inherit
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# uses: ./.github/workflows/gh-travis.yml
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
|
||||
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
|
||||
# To cancel jobs if one fails, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
42
.github/workflows/ci-on-push.yml
vendored
42
.github/workflows/ci-on-push.yml
vendored
@@ -1,42 +0,0 @@
|
||||
name: "CI-PUSH"
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
uses: ./.github/workflows/pre-commit.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phan:
|
||||
uses: ./.github/workflows/phan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
phpstan:
|
||||
uses: ./.github/workflows/phpstan.yml
|
||||
secrets: inherit
|
||||
needs: [pre-commit]
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
windows-ci:
|
||||
needs: [pre-commit, phan, phpstan]
|
||||
secrets: inherit
|
||||
uses: ./.github/workflows/windows-ci.yml
|
||||
with:
|
||||
gh_event: ${{ github.event_name }}
|
||||
# gh-travis: # Runs travis script on github runner (not on travis)
|
||||
# if: false
|
||||
# # needs: [pre-commit, phan]
|
||||
# # needs: [windows-ci]
|
||||
# secrets: inherit
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# uses: ./.github/workflows/gh-travis.yml
|
||||
# with:
|
||||
# gh_event: ${{ github.event_name }}
|
||||
|
||||
# Note (not tested, from https://github.com/orgs/community/discussions/38361)
|
||||
# To cancel jobs if one fails, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
82
.github/workflows/ci-phpstan_baseline.yml
vendored
82
.github/workflows/ci-phpstan_baseline.yml
vendored
@@ -1,82 +0,0 @@
|
||||
---
|
||||
# This run the script to update the phpstan baseline file dev/build/phpstan/phpstan-baseline.neon
|
||||
name: 'PHPStan baseline'
|
||||
|
||||
on:
|
||||
# Every day we want to refresh the baseline
|
||||
schedule:
|
||||
- cron: '0 12 * * *'
|
||||
|
||||
# We want to be able to manually refresh the baseline too
|
||||
workflow_dispatch:
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# Run PHPStan analyse on pull requests
|
||||
# pull_request:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
env:
|
||||
PHP_VERSION: '8.2'
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }}
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.1.12, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
env:
|
||||
fail-fast: true
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-
|
||||
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main
|
||||
with:
|
||||
github_token: ${{ env.GH_TOKEN }}
|
||||
phpstan_path: phpstan
|
||||
configuration_path: phpstan.neon.dist
|
||||
phpstan_additional_arguments: --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php
|
||||
baseline_path: dev/build/phpstan/phpstan-baseline.neon
|
||||
commit_name: Dolibot
|
||||
commit_email: dolibarr-bot@users.noreply.github.com
|
||||
commit_message: PHPStan > Update baseline
|
||||
target_branch: develop
|
||||
# pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
pr_create: 1
|
||||
pr_title: PHPStan > Update baseline
|
||||
pr_reviewer: eldy
|
||||
pr_body: |
|
||||
This PR is automatically created to cleanup our baseline.
|
||||
|
||||
Since the last refresh of the baseline we have fixed {0} ignored errors.
|
||||
|
||||
Keep it up all! :muscle:
|
||||
|
||||
There are only {1} ignored errors left :sweat_smile:
|
||||
45
.github/workflows/ci-pr-devcamp.yaml.disabled
vendored
45
.github/workflows/ci-pr-devcamp.yaml.disabled
vendored
@@ -1,45 +0,0 @@
|
||||
# Action to prepare the github action
|
||||
# Go on Dolibarr Organization - Settings - Developer settings - GitHub App (https://github.com/organizations/Dolibarr/settings/apps)
|
||||
# Create an App: Enter a name + In Home page URL use https://github.com/Dolibarr/dolibarr + Disable webhook
|
||||
# Set Permissions (see other app for list of permissions)
|
||||
# Click on generate the private keys
|
||||
# Click on Install application - choose the repository of the bot
|
||||
# Go on Organisation - Secret and variables and create a secret PR_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
|
||||
# Go on Organisation - Secret and variables and create a variable PR_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
|
||||
#
|
||||
|
||||
name: Set the tag with devcamp label during the session of a devcamp
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
add-label-devcamp:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
#- name: Install GitHub CLI
|
||||
# run: sudo apt-get install gh
|
||||
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ vars.PR_APP_ID }}
|
||||
private-key: ${{ secrets.PR_SECRET_KEY }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Assign label
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
echo "env.url=${{env.url}}"
|
||||
gh pr edit "${{env.url}}" --add-label "Event: DevCamp 2025 XXX"
|
||||
28
.github/workflows/ci-stale-issues-safe.yml
vendored
28
.github/workflows/ci-stale-issues-safe.yml
vendored
@@ -1,28 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 21 * * *"
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
24
.github/workflows/ci-tag-check.yml.disabled
vendored
24
.github/workflows/ci-tag-check.yml.disabled
vendored
@@ -1,24 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Check tag branch"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "18.*"
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Verify tag is on main
|
||||
run: |
|
||||
TAG_COMMIT=$(git rev-list -n 1 $GITHUB_REF)
|
||||
if ! git branch --contains $TAG_COMMIT | grep -q "18.0"; then
|
||||
echo "The tag must be on branch 18.0"
|
||||
exit 1
|
||||
fi
|
||||
17
.github/workflows/exakat.yml
vendored
Normal file
17
.github/workflows/exakat.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
|
||||
jobs:
|
||||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Exakat
|
||||
uses: docker://exakat/exakat-ga
|
||||
with:
|
||||
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
|
||||
ignore_dirs: '/htdocs/includes,/build,/dev,/doc,/scripts,/test'
|
||||
49
.github/workflows/gh-travis.yml.disabled
vendored
49
.github/workflows/gh-travis.yml.disabled
vendored
@@ -1,49 +0,0 @@
|
||||
---
|
||||
# This runs a travis script inside a github runner
|
||||
name: Travis
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: travis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job
|
||||
gh-travis:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version:
|
||||
# # PHPStan requires PHP >= 7.2.
|
||||
# #- "7.2"
|
||||
- "8.2"
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: Checkout travis file
|
||||
uses: actions/checkout@v5
|
||||
- name: Run .travis.yml build script
|
||||
uses: ktomk/run-travis-yml@v1
|
||||
with:
|
||||
# run-job: travis # name of a job in travis file
|
||||
allow-failure: false
|
||||
# file: .travis.yml
|
||||
# steps: | # Default: setup, before_install, install, before_script, script, after_script, before_deploy
|
||||
# install
|
||||
# script
|
||||
# env:
|
||||
# TRAVIS_PHP_VERSION: ${{ matrix.php-version }}
|
||||
364
.github/workflows/github_ci_php71_pgsql.yml.disabled
vendored
364
.github/workflows/github_ci_php71_pgsql.yml.disabled
vendored
@@ -1,364 +0,0 @@
|
||||
name: GitHub CI PHP 7.1 Postgres
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- 1*
|
||||
- 2*
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
github_ci_php71_pgsql:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ports:
|
||||
- 32574:3306
|
||||
postgres:
|
||||
image: postgres
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: postgres
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
steps:
|
||||
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Version PHP
|
||||
run: |
|
||||
php -i | head -
|
||||
|
||||
- name: Install packages for PHP 7.1
|
||||
run: |
|
||||
sudo composer self-update 2.2.18
|
||||
sudo chmod -R a+rwx /home/runner
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pgloader memcached
|
||||
sudo apt install apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
php -i | head -
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
ls $GITHUB_WORKSPACE
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7.5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
#For php7.3
|
||||
#composer -n require phpunit/phpunit ^7.5 \
|
||||
# php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
# php-parallel-lint/php-console-highlighter ^0 \
|
||||
# php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
# squizlabs/php_codesniffer ^3
|
||||
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
|
||||
|
||||
- name: Adding path of binaries tools installed by composer to the PATH
|
||||
run: |
|
||||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
# We must have a directory bin created by the previous composer call
|
||||
ls $GITHUB_WORKSPACE/htdocs/includes/bin
|
||||
|
||||
- name: Version information
|
||||
run: |
|
||||
composer -V
|
||||
# Check Parallel-lint version
|
||||
echo "Parallel-lint version"
|
||||
htdocs/includes/bin/parallel-lint -V
|
||||
# Check PHP CodeSniffer version
|
||||
echo "PHPCS version"
|
||||
htdocs/includes/bin/phpcs --version | head -
|
||||
htdocs/includes/bin/phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
htdocs/includes/bin/var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
htdocs/includes/bin/phpunit --version | head -
|
||||
# Check Apache version
|
||||
echo "Apache version"
|
||||
apache2 -v | head -
|
||||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
psql --version
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
|
||||
- name: Create database
|
||||
run: |
|
||||
pwd
|
||||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
|
||||
sudo apt-get install -y mysql-client
|
||||
mysql --version | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
|
||||
|
||||
echo "Init postgresql database"
|
||||
ps fauxww | grep postgres
|
||||
ls /etc/postgresql/14/main/
|
||||
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo /etc/init.d/postgresql restart
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
|
||||
|
||||
sudo mkdir -p /tmp/pgloader
|
||||
sudo chmod -R a+rwx /tmp/pgloader/
|
||||
|
||||
echo sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
sudo pgloader mysql://root:password@127.0.0.1:32574/travis postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql postgresql://postgres:postgres@127.0.0.1:5432/travis
|
||||
|
||||
# Create pgsql compatibility functions
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432/travis < htdocs/install/pgsql/functions/functions.sql
|
||||
|
||||
- name: Generate Dolibarr conf file
|
||||
run: |
|
||||
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
- name: Generate install.forced.php file to test installation
|
||||
run: |
|
||||
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'postgres\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'postgres\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
|
||||
cat $INSTALL_FORCED_FILE
|
||||
|
||||
- name: Create document directory
|
||||
run: |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
sudo mkdir -p /var/www/html/documents/admin/temp
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
|
||||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
|
||||
|
||||
- name: Copy app into /var/www
|
||||
run: |
|
||||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
|
||||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
|
||||
sudo ln -fs /var/www/html /var/www/htdocs
|
||||
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
|
||||
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
|
||||
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
|
||||
|
||||
- name: Setup Apache
|
||||
run: |
|
||||
pwd
|
||||
whoami
|
||||
# install apache web server
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php7.1
|
||||
ls /etc/apache2/sites-enabled
|
||||
sudo adduser $(whoami) www-data
|
||||
sudo adduser $(whoami) root
|
||||
sudo adduser root www-data
|
||||
sudo chown -R www-data:www-data /etc/apache2/sites-available/
|
||||
sudo chmod -R 777 /etc/apache2/sites-available/
|
||||
sudo chown -R www-data:www-data /var/www/html/
|
||||
ls -l /var/www/html
|
||||
#ls -l /var/www/html/conf
|
||||
#ls -l /var/www/html/install/
|
||||
set +e
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
ls /var/log/apache2
|
||||
#wget -O - --debug http://127.0.0.1/robots.txt
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
|
||||
head -n 200 $GITHUB_WORKSPACE/test.html
|
||||
|
||||
echo Logs are...
|
||||
#sudo cat /tmp/install.log
|
||||
sudo cat /var/log/apache2/access.log
|
||||
sudo cat /var/log/apache2/error.log
|
||||
sudo cat /var/log/apache2/other_vhosts_access.log
|
||||
set +e
|
||||
|
||||
- name: Upgrading Dolibarr
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set -e
|
||||
sudo chmod -R a+rwx $GITHUB_WORKSPACE
|
||||
sudo chmod -R a+rwx /var/www
|
||||
ls -l /var/www
|
||||
cd /var/www/html/install
|
||||
|
||||
echo Execute upgrade, upgrade2 and step5 for each major version
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
|
||||
|
||||
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
|
||||
|
||||
- name: Result of migration scripts
|
||||
if: always()
|
||||
run: |
|
||||
ls -alrt $GITHUB_WORKSPACE/
|
||||
|
||||
echo Show content of last file
|
||||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
|
||||
|
||||
- name: Enabling new modules
|
||||
run: |
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
cd /var/www/html/install
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
|
||||
- name: Result of enabling modules scripts
|
||||
if: always()
|
||||
run: |
|
||||
echo Show content of enablemodule.log file
|
||||
cat $GITHUB_WORKSPACE/enablemodule.log
|
||||
|
||||
- name: Unit testing
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
cd /var/www/html
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
333
.github/workflows/github_ci_php81_mysql.yml.disabled
vendored
333
.github/workflows/github_ci_php81_mysql.yml.disabled
vendored
@@ -1,333 +0,0 @@
|
||||
name: GitHub CI PHP 8.1 MySQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
- 1*
|
||||
- 2*
|
||||
pull_request:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
github_ci_php81_mysql:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ports:
|
||||
- 32574:3306
|
||||
|
||||
steps:
|
||||
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Version PHP
|
||||
run: |
|
||||
php -i | head -
|
||||
|
||||
- name: Install packages for PHP 8.1
|
||||
run: |
|
||||
sudo composer self-update 2.2.18
|
||||
sudo chmod -R a+rwx /home/runner
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pgloader memcached
|
||||
sudo apt install apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
php -i | head -
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
ls $GITHUB_WORKSPACE
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
|
||||
|
||||
- name: Adding path of binaries tools installed by composer to the PATH
|
||||
run: |
|
||||
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
# We must have a directory bin created by the previous composer call
|
||||
ls $GITHUB_WORKSPACE/htdocs/includes/bin
|
||||
|
||||
- name: Version information
|
||||
run: |
|
||||
composer -V
|
||||
# Check Parallel-lint version
|
||||
echo "Parallel-lint version"
|
||||
htdocs/includes/bin/parallel-lint -V
|
||||
# Check PHP CodeSniffer version
|
||||
echo "PHPCS version"
|
||||
htdocs/includes/bin/phpcs --version | head -
|
||||
htdocs/includes/bin/phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
htdocs/includes/bin/var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
htdocs/includes/bin/phpunit --version | head -
|
||||
# Check Apache version
|
||||
echo "Apache version"
|
||||
apache2 -v | head -
|
||||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
psql --version
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
|
||||
- name: Create database
|
||||
run: |
|
||||
pwd
|
||||
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
|
||||
sudo apt-get install -y mysql-client
|
||||
mysql --version | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
|
||||
|
||||
echo "Drop and create database"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
|
||||
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
|
||||
|
||||
- name: Generate Dolibarr conf file
|
||||
run: |
|
||||
export CONF_FILE=$GITHUB_WORKSPACE/htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'/var/www/html\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'/var/www/html/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'32574\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
- name: Generate install.forced.php file to test installation
|
||||
run: |
|
||||
export INSTALL_FORCED_FILE=$GITHUB_WORKSPACE/htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'root\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'password\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'32574\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
|
||||
cat $INSTALL_FORCED_FILE
|
||||
|
||||
- name: Create document directory
|
||||
run: |
|
||||
echo "Create documents directory and set permissions"
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
sudo mkdir -p /var/www/html/documents/admin/temp
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
|
||||
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
|
||||
|
||||
- name: Copy app into /var/www
|
||||
run: |
|
||||
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
|
||||
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
|
||||
sudo ln -fs /var/www/html /var/www/htdocs
|
||||
sudo cp -r $GITHUB_WORKSPACE/test/. /var/www/test
|
||||
sudo cp -r $GITHUB_WORKSPACE/dev/. /var/www/dev
|
||||
sudo cp -r $GITHUB_WORKSPACE/scripts/. /var/www/scripts
|
||||
|
||||
- name: Setup Apache
|
||||
run: |
|
||||
pwd
|
||||
whoami
|
||||
# install apache web server
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php8.1
|
||||
ls /etc/apache2/sites-enabled
|
||||
sudo adduser $(whoami) www-data
|
||||
sudo adduser $(whoami) root
|
||||
sudo adduser root www-data
|
||||
sudo chown -R www-data:www-data /etc/apache2/sites-available/
|
||||
sudo chmod -R 777 /etc/apache2/sites-available/
|
||||
sudo chown -R www-data:www-data /var/www/html/
|
||||
ls -l /var/www/html
|
||||
#ls -l /var/www/html/conf
|
||||
#ls -l /var/www/html/install/
|
||||
set +e
|
||||
sudo cat /etc/apache2/sites-enabled/000-default.conf
|
||||
sudo service apache2 restart
|
||||
curl -I localhost
|
||||
- name: Check Apache availability
|
||||
run: |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
ls /var/log/apache2
|
||||
#wget -O - --debug http://127.0.0.1/robots.txt
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
|
||||
head -n 200 $GITHUB_WORKSPACE/test.html
|
||||
|
||||
echo Logs are...
|
||||
#sudo cat /tmp/install.log
|
||||
sudo cat /var/log/apache2/access.log
|
||||
sudo cat /var/log/apache2/error.log
|
||||
sudo cat /var/log/apache2/other_vhosts_access.log
|
||||
set +e
|
||||
|
||||
- name: Upgrading Dolibarr
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set -e
|
||||
sudo chmod -R a+rwx $GITHUB_WORKSPACE
|
||||
sudo chmod -R a+rwx /var/www
|
||||
ls -l /var/www
|
||||
cd /var/www/html/install
|
||||
echo Execute upgrade, upgrade2 and step5 for each major version
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $GITHUB_WORKSPACE/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $GITHUB_WORKSPACE/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $GITHUB_WORKSPACE/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $GITHUB_WORKSPACE/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $GITHUB_WORKSPACE/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $GITHUB_WORKSPACE/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $GITHUB_WORKSPACE/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $GITHUB_WORKSPACE/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $GITHUB_WORKSPACE/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $GITHUB_WORKSPACE/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $GITHUB_WORKSPACE/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $GITHUB_WORKSPACE/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $GITHUB_WORKSPACE/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $GITHUB_WORKSPACE/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $GITHUB_WORKSPACE/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $GITHUB_WORKSPACE/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $GITHUB_WORKSPACE/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
|
||||
|
||||
- name: Result of migration scripts
|
||||
if: always()
|
||||
run: |
|
||||
ls -alrt $GITHUB_WORKSPACE/
|
||||
|
||||
echo Show content of last file
|
||||
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
|
||||
|
||||
- name: Enabling new modules
|
||||
run: |
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
cd /var/www/html/install
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $GITHUB_WORKSPACE/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
|
||||
- name: Result of enabling modules scripts
|
||||
if: always()
|
||||
run: |
|
||||
echo Show content of enablemodule.log file
|
||||
cat $GITHUB_WORKSPACE/enablemodule.log
|
||||
|
||||
- name: Unit testing
|
||||
run: |
|
||||
# Ensure we catch errors. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
cd /var/www/html
|
||||
sudo chmod -R a+rwx /var/www/html/documents
|
||||
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
- name: Code quality check - Lint
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
|
||||
- name: Code quality check - phpcs
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
|
||||
- name: Code quality check - var-dump-check
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
htdocs/includes/bin/var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
13
.github/workflows/greetings-pr.yml.disabled
vendored
Normal file
13
.github/workflows/greetings-pr.yml.disabled
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Greetings PR
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pr-message: 'Welcome to the Dolibarr army. You are on the road to become an Admiral (see https://wiki.dolibarr.org/index.php/Dolibarr_Project)'
|
||||
46
.github/workflows/phan.yml
vendored
46
.github/workflows/phan.yml
vendored
@@ -1,46 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check code with PHPSTAN tool
|
||||
name: Phan
|
||||
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: phan-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHAN_CONFIG: dev/tools/phan/config.php
|
||||
PHAN_BASELINE: dev/tools/phan/baseline.txt
|
||||
PHAN_MIN_PHP: 7.2
|
||||
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
|
||||
jobs:
|
||||
phan:
|
||||
name: Run phan
|
||||
runs-on: ubuntu-latest
|
||||
# Do not run schedule on forks
|
||||
if: |
|
||||
github.repository == 'Dolibarr/dolibarr'
|
||||
|| github.event.schedule == false
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phan
|
||||
- name: Run Phan analysis
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=github
|
||||
95
.github/workflows/phpstan.yml
vendored
95
.github/workflows/phpstan.yml
vendored
@@ -1,95 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check code with PHPSTAN tool
|
||||
name: PHPStan
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: phpstan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job
|
||||
php-stan:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-version:
|
||||
# PHPStan requires PHP >= 7.2.
|
||||
#- "7.2"
|
||||
- '8.2'
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v5
|
||||
# Get PHP and addons
|
||||
- name: Setup PHP
|
||||
id: setup-php
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.1.12, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-
|
||||
- name: Show debug into
|
||||
run: cd ./.github/tmp && ls -al
|
||||
|
||||
# Run PHPStan
|
||||
- name: Run PHPStan
|
||||
id: phpstan
|
||||
run: |
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
|
||||
# continue-on-error: true
|
||||
|
||||
# Save cache
|
||||
- name: Save phpstan cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ success() || ( ! cancelled() && steps.cache.outputs.cache-hit != 'true' ) }}
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
- name: Provide phpstan log as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: phpstan-srcrt
|
||||
path: ${{ github.workspace }}/_stan.xml
|
||||
retention-days: 2
|
||||
# Run PHPStan generate baseline
|
||||
# - name: Run PHPStan generate baseline
|
||||
# id: phpstan-baseline
|
||||
# if: ${{ success() }}
|
||||
# run: |
|
||||
# phpstan -vv analyse --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php --generate-baseline dev/build/phpstan/phpstan-baseline.neon
|
||||
175
.github/workflows/pre-commit.yml
vendored
175
.github/workflows/pre-commit.yml
vendored
@@ -1,175 +0,0 @@
|
||||
---
|
||||
name: pre-commit
|
||||
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RAW_LOG: pre-commit.log
|
||||
CS_XML: pre-commit.xml
|
||||
steps:
|
||||
#- name: Install required tools
|
||||
# run: sudo apt-get update && sudo apt-get install cppcheck
|
||||
# if: false
|
||||
|
||||
# Checkout git sources to analyze
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
# Try to get the list of modified files into steps.changed-php.outputs.all_changed_files
|
||||
#- name: Get changed files
|
||||
# id: changed-files
|
||||
# uses: actions/github-script@v7
|
||||
# with:
|
||||
# script: |
|
||||
# const base = context.payload.pull_request?.base?.sha;
|
||||
# const head = context.payload.pull_request?.head?.sha;
|
||||
# const response = await github.rest.repos.compareCommits({
|
||||
# owner: context.repo.owner,
|
||||
# repo: context.repo.repo,
|
||||
# base,
|
||||
# head
|
||||
# });
|
||||
#
|
||||
# const changedFiles = response.data.files.map(file => file.filename);
|
||||
# core.setOutput("all_changed_files", changedFiles.join(" "));
|
||||
|
||||
# Another method to get the list of changed files
|
||||
# It sets the variable steps.changed-php.outputs.all_changed_files for other steps
|
||||
- name: Get all changed php files (if PR)
|
||||
id: changed-php
|
||||
if: env.gh_event == 'pull_request'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./.github/scripts/get_changed_php.sh
|
||||
|
||||
#- name: Print changed files
|
||||
# run: echo "Changed files are ${{ steps.changed-files.outputs.all_changed_files }}"
|
||||
|
||||
# Action setup-python needs a requirements.txt or pyproject.toml
|
||||
# This ensures one of them exists.
|
||||
- name: Create requirements.txt if no requirements.txt or pyproject.toml
|
||||
run: |-
|
||||
[ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt
|
||||
# Install python and pre-commit tool
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
cache: pip
|
||||
python-version: "3.11"
|
||||
- run: python -m pip install pre-commit
|
||||
|
||||
# Restore previous cache of precommit
|
||||
- uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
# Run all the precommit tools (defined in pre-commit-config.yaml).
|
||||
- name: Extract PHP version
|
||||
id: extract-php-version
|
||||
run: |
|
||||
# shellcheck disable=SC2016
|
||||
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
|
||||
echo "PHP_VERSION=$PHP_VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install proper php version, and also install phpcs which may be needed
|
||||
if: |
|
||||
! cancelled() &&
|
||||
(
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }} # Version from check.php
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml).
|
||||
# We can force exclusion of some of them here.
|
||||
- name: Run pre-commit hooks
|
||||
env:
|
||||
# SKIP is used by pre-commit to not execute certain hooks
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer
|
||||
run: |
|
||||
set -o pipefail
|
||||
pre-commit gc
|
||||
pre-commit run --show-diff-on-failure --color=always --all-files | tee "${RAW_LOG}"
|
||||
|
||||
# The next uses git, which is slow for a bit repo.
|
||||
# - name: Get all changed php files (if PR)
|
||||
# id: changed-php
|
||||
# uses: tj-actions/changed-files@v45
|
||||
# if: env.gh_event == 'pull_request'
|
||||
# with:
|
||||
# files: |
|
||||
# **.php
|
||||
|
||||
- name: Run some pre-commit hooks on selected changed files only
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
# shellcheck disable=2086
|
||||
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a "${RAW_LOG}"
|
||||
|
||||
- name: Run some pre-commit hooks on all files on push to "main" branches
|
||||
if: |
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
run: |
|
||||
set -o pipefail
|
||||
ln -sf ~/.cache .cache # Absolute path in .pre-commit-config.yaml
|
||||
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a "${RAW_LOG}"
|
||||
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a "${RAW_LOG}"
|
||||
ls -l ~/.cache/pre-commit/
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2025.1.1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.RAW_LOG }}
|
||||
|
||||
# Save the precommit cache
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
# Upload result log files of precommit into the Artifact shared store
|
||||
- name: Provide log as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
name: precommit-logs
|
||||
path: |
|
||||
${{ env.RAW_LOG }}
|
||||
${{ env.CS_XML }}
|
||||
24
.github/workflows/stale-issues-safe.yml
vendored
Normal file
24
.github/workflows/stale-issues-safe.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 21 * * *"
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
25
.github/workflows/stale-issues.yml.disabled
vendored
Normal file
25
.github/workflows/stale-issues.yml.disabled
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 20 * * *"
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@master
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
|
||||
stale-issue-label: 'Issue Stale (automatic label)'
|
||||
exempt-issue-label: 'Priority High / Blocking'
|
||||
days-before-stale: 365
|
||||
days-before-close: -1
|
||||
operations-per-run: 100
|
||||
#stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. If this PR is still mergeable (no conflict, nor Continuous Integration errors), please comment to confirm this merge is still expected. Without comment, this issue will be closed automatically by stale bot in 15 days.'
|
||||
stale-pr-label: 'PR Stale (automatic label)'
|
||||
stale-pr-message:
|
||||
exempt-pr-label: 'Priority Top Strategic'
|
||||
|
||||
199
.github/workflows/windows-ci.yml
vendored
199
.github/workflows/windows-ci.yml
vendored
@@ -1,199 +0,0 @@
|
||||
---
|
||||
name: Win CI
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
on:
|
||||
# workflow called by the parent workflow ci.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# can run job manually
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: win-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHPUNIT_LOG: phpunit_tests.log
|
||||
DOLIBARR_LOG: documents/dolibarr.log
|
||||
PHPSERVER_LOG: phpserver.log
|
||||
PHPSERVER_DOMAIN_PORT: 127.0.0.1:8000 # could be 127.0.0.1:8000 if config modified
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
PHP_INI_SCAN_DIR: C:\myphpini
|
||||
CKEY: win-ci-2
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
|
||||
jobs:
|
||||
win-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
# php_version: [7.4, 8.0] # Add more versions if needed
|
||||
php_version: [7.4] # Add more versions if needed
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php_version }}
|
||||
# ini-values: post_max_size=256M, max_execution_time=180
|
||||
extensions: >
|
||||
calendar, gd, imagick, imap, intl, json, ldap, mbstring,
|
||||
mcrypt, mysql, mysqli, opcache, pgsql, sqlite3, xml, zip
|
||||
tools: >
|
||||
composer,
|
||||
phpunit:9.5
|
||||
coverage: none
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# phpts: ts # ts for thread-safe, default nts
|
||||
|
||||
# Restore cache
|
||||
- name: Restore cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php', 'htdocs/version.inc.php') }}
|
||||
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
enableCrossOsArchive: true
|
||||
path: |
|
||||
./db_init.sql
|
||||
./db_init.sql.md5
|
||||
./.cache/mariadb
|
||||
key: ${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.head_ref }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.base_ref }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-
|
||||
# ${{ env.KEY_ROOT }}-
|
||||
|
||||
- name: Setup MariaDB
|
||||
uses: frederic34/setup-mariadb@v1
|
||||
with:
|
||||
# mariadb-version: ${{ matrix.mariadb-version }}
|
||||
database: travis # Specify your database name
|
||||
|
||||
- name: Create local php.ini with open_basedir restrictions
|
||||
shell: cmd
|
||||
# Objective: separate step, and before database initialisation to verify open_basedir restrictions
|
||||
run: |-
|
||||
echo "BASEDIR=%CD%" >> %GITHUB_ENV%
|
||||
ECHO "==== Show INI file usage before our configuration ==="
|
||||
php --ini
|
||||
ECHO "==== Set PHP_INI_SCAN_DIR to include the INI File we create ==="
|
||||
mkdir %PHP_INI_SCAN_DIR%
|
||||
SET INIFILE="%PHP_INI_SCAN_DIR%\dolibarr.ini"
|
||||
SET HTDOCS_DIR=%CD%\htdocs
|
||||
SET DATA_DIR=%CD%\documents
|
||||
SET TEST_DIR=%CD%\test
|
||||
SET INITDEMO_DIR=%CD%\dev\initdemo
|
||||
ECHO "==== Create INI file to set open_basedir ==="
|
||||
echo [php] > %INIFILE%
|
||||
echo open_basedir^="%HTDOCS_DIR%;%DATA_DIR%;%TEST_DIR%;%INITDEMO_DIR%;%PHPROOT%" >> %INIFILE%
|
||||
REM Unset PHP_INI_SCAN_DIR to disable open_basedir restritions (to limit debug effort)
|
||||
REM SET PHP_INI_SCAN_DIR=
|
||||
ECHO "==== Show contents of INI file to set open_basedir ==="
|
||||
type %INIFILE%
|
||||
ECHO "==== Verify it is used by PHP ==="
|
||||
php --ini
|
||||
REM TEST OPEN_BASEDIR restriction is not limiting wrongly
|
||||
REM THE DATA_DIR MUST BE CREATED HERE - open_base does not allow it's creation
|
||||
mkdir "%DATA_DIR%"
|
||||
mkdir "%DATA_DIR%\mytest"
|
||||
php -r "$d=implode(DIRECTORY_SEPARATOR,[__DIR__,'documents','mytest']);echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'TEST PATH IS SHOWN: '.$d.PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
ECHO "The above should show 2 successful tests"
|
||||
|
||||
- name: Run Bash script that Initialises the database
|
||||
# Note this is bash (MSYS) on Windows
|
||||
shell: bash
|
||||
run: |
|
||||
# shellcheck disable=SC2129
|
||||
ECHO "#[group]Directory contents to verify cache files, ..."
|
||||
ls -l
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== Verify openbase_dir restriction"
|
||||
php --ini
|
||||
# Run bash script to initialise database
|
||||
ECHO "==== Start 'setup_conf.sh' to setup database"
|
||||
${SHELL} -xv dev/setup/phpunit/setup_conf.sh
|
||||
## Updating test configuration to not stop on first failure (to see all errors) - need sed
|
||||
sed -i -e 's/stopOnFailure="[^"]*"/stopOnFailure="false"/' test/phpunit/phpunittest.xml
|
||||
ECHO "#[group]Directory contents after database setup to verify cache files, ..."
|
||||
ls -l
|
||||
ECHO "#[endgroup]"
|
||||
# Export some tool paths to reuse the from CMD shell.
|
||||
{
|
||||
echo "TAIL=$(cygpath -w "$(which tail)")"
|
||||
echo "GREP=$(cygpath -w "$(which grep)")"
|
||||
echo "TEE=$(cygpath -w "$(which tee)")"
|
||||
echo "BASEDIR=$(realpath .)"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
# continue-on-error: true
|
||||
shell: cmd
|
||||
# setting up php.ini, starting the php server are currently in this step
|
||||
run: |-
|
||||
ECHO "==== Visually verify our dolibarr.INI file usage ==="
|
||||
php --ini
|
||||
ECHO "==== Add our web server information to the config file ==="
|
||||
echo $dolibarr_main_url_root="http://${{ env.PHPSERVER_DOMAIN_PORT }}"; >> htdocs/conf/conf.php
|
||||
ECHO "#[group]==== Dolibarr config file contents"
|
||||
cat htdocs/conf/conf.php
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHP server"
|
||||
start /B php -S %PHPSERVER_DOMAIN_PORT% -t htdocs >> %PHPSERVER_LOG% 2>&1
|
||||
ECHO "#[group]==== Output from curl on PHP server"
|
||||
curl "http://${{ env.PHPSERVER_DOMAIN_PORT }}"
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHPUNIT TESTS"
|
||||
REM 'DOSKEY' USED to recover error code (no pipefile equivalent in windows?)
|
||||
( php "%PHPROOT%\phpunit" -d memory_limit=-1 -c %CD%\test\phpunit\phpunittest.xml "test\phpunit\AllTests.php" --exclude-group WindowsWaitingForFix & call doskey /exename=err err=%%^^errorlevel%% ) | "${{ env.TEE }}" "${{ env.PHPUNIT_LOG }}"
|
||||
echo ""
|
||||
echo "Ensure that PHPUNIT completed (no early exit from code)"
|
||||
"${{ env.TAIL }}" -5 "${{ env.PHPUNIT_LOG }}" | "${{ env.GREP }}" -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" || EXIT /B 1
|
||||
echo "PHPUNIT seems to have completed with a test result, reuse the exit code"
|
||||
for /f "tokens=2 delims==" %%A in ('doskey /m:err') do EXIT /B %%A
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2025.1.1
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.PHPUNIT_LOG }}
|
||||
|
||||
- name: Provide dolibarr and phpunit logs as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
name: win-ci-logs
|
||||
path: |
|
||||
${{ env.PHPUNIT_LOG }}
|
||||
${{ env.DOLIBARR_LOG }}
|
||||
${{ env.PHPSERVER_LOG }}
|
||||
db_init.sql
|
||||
db_init.sql.md5
|
||||
retention-days: 2
|
||||
|
||||
# Save cache
|
||||
- name: Save cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
enableCrossOsArchive: true
|
||||
key: ${{ steps.cache.outputs.cache-primary-key }}
|
||||
path: |
|
||||
./db_init.sql
|
||||
./db_init.sql.md5
|
||||
./.cache/mariadb
|
||||
46
.gitignore
vendored
46
.gitignore
vendored
@@ -14,11 +14,11 @@ default.properties
|
||||
/.pydevproject
|
||||
/.vscode
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
*.orig
|
||||
Thumbs.db
|
||||
/dolibarr_genesis.mp4
|
||||
.phpunit.result.cache
|
||||
# Log files
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
@@ -41,20 +41,13 @@ htdocs/includes/php-parallel-lint/
|
||||
htdocs/includes/sebastian/
|
||||
htdocs/includes/squizlabs/
|
||||
htdocs/includes/webmozart/
|
||||
htdocs/install/install.forced.php
|
||||
htdocs/.well-known/apple-developer-merchantid-domain-association
|
||||
/factory/
|
||||
/output/
|
||||
|
||||
# Node Modules
|
||||
dev/build/yarn-error.log
|
||||
dev/build/node_modules/
|
||||
build/yarn-error.log
|
||||
build/node_modules/
|
||||
node_modules/
|
||||
|
||||
vendor/
|
||||
php-vendor
|
||||
tmp/
|
||||
|
||||
#yarn
|
||||
yarn.lock
|
||||
|
||||
@@ -62,35 +55,4 @@ yarn.lock
|
||||
package-lock.json
|
||||
|
||||
doc/install.lock
|
||||
/.asciidoctorconfig.adoc
|
||||
|
||||
.idea
|
||||
/composer.json
|
||||
/composer.lock
|
||||
|
||||
# Local script, executed during pre-commit
|
||||
/local.sh
|
||||
|
||||
# Local phpstan configuration
|
||||
/phpstan.neon
|
||||
/phpstan-baseline.neon
|
||||
|
||||
# Logs
|
||||
/*.log
|
||||
|
||||
# Vim swap files
|
||||
*.sw?
|
||||
|
||||
# Generated by PHPUNIT.BAT
|
||||
/INI_PHPUNIT
|
||||
|
||||
# ignore cache builds
|
||||
/dev/build/phpstan/phpstan
|
||||
/dev/build/phpstan/bootstrap_custom.php
|
||||
phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/.cache
|
||||
|
||||
# ignore .htaccess files
|
||||
.htaccess
|
||||
/factory/
|
||||
|
||||
11
.mailmap
11
.mailmap
@@ -1,14 +1,11 @@
|
||||
# This is mapping list between real user name/email and entry into sources files
|
||||
# If you don't want to have your real email appears here, just send a Pull Request to
|
||||
# replace the second field between <> with <secret>
|
||||
#
|
||||
# This files allows to have several profiles (the second part) matched to the same name/email (the first part).
|
||||
#
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Regis Houssin <regis@dolibarr.fr>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Régis Houssin <regishoussin@device5.home>
|
||||
Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es>
|
||||
@@ -92,9 +89,3 @@ Baffir Abbes <bafbes@users.noreply.github.com> bafbes <bafbes@users.noreply.gith
|
||||
Kevin Guerrier <guerrier.k@gmail.com> GUERRIER Kevin <guerrier.k@gmail.com>
|
||||
Remy Younes <ryounes@gmail.com> remy <ryounes@gmail.com>
|
||||
Estephe Loridan <github@estephe.me> Estephe L. <github@estephe.me>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <anthony.berton@bb2a.fr>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Anthony Berton <bertonanthony@gmail.com>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> Berton Anthony <bertonanthony@gmail.com>
|
||||
Anthony Berton <anthony.berton@bb2a.fr> BB2A-Anthony <bertonanthony@gmail.com>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
return include __DIR__ . "/../dev/tools/phan/config.php";
|
||||
@@ -1,276 +0,0 @@
|
||||
---
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$
|
||||
repos:
|
||||
# Several miscellaneous checks and fix (on yaml files, end of files fix)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
# This hook tests the name of the branch and return an error if the name is
|
||||
# 'develop' or an official version 'x.y'
|
||||
# So you can't commit if your branch name is not a custom branch name.
|
||||
# Using a custom branch name is good practice that makes it easier to manage PRs.
|
||||
# You can skip this:
|
||||
# - Permanently:
|
||||
# export SKIP=no-commit-to-branch # In your .bashrc or session.
|
||||
# - Only this for one commit:
|
||||
# SKIP=no-commit-to-branch git commit -a -m "My message"
|
||||
# - Skipping all checks for a commit:
|
||||
# git commit -a -m "My message" --no-verify
|
||||
# (Recommendation: run git commit -a .. once, then with `--no-verify`)
|
||||
- id: no-commit-to-branch
|
||||
args: [--branch, develop, --pattern, \d+.0$]
|
||||
# This checks that xml files are correct
|
||||
- id: check-xml
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/.*)$
|
||||
# This checks that yaml files are correct
|
||||
- id: check-yaml
|
||||
args: [--unsafe]
|
||||
# This checks that json files are correct
|
||||
- id: check-json
|
||||
# Fixes Fix files that have DOS end of line endings
|
||||
- id: mixed-line-ending
|
||||
# alternative for dev/tools/fixdosfiles.sh
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*
|
||||
|.*/CRLF.*.php # Files in swiftmailer
|
||||
)$
|
||||
args: [--fix=lf]
|
||||
# Remove trailing whitespace
|
||||
- id: trailing-whitespace
|
||||
exclude_types: [markdown]
|
||||
# Fix the end of file
|
||||
- id: end-of-file-fixer
|
||||
# Check that there are no completely merged file conflicts
|
||||
- id: check-merge-conflict
|
||||
stages: [pre-rebase, pre-commit, pre-merge-commit]
|
||||
# Check that files with shebangs have the executable bit set (in git)
|
||||
- id: check-executables-have-shebangs
|
||||
# Check that shell files are executables
|
||||
- id: check-shebang-scripts-are-executable
|
||||
exclude:
|
||||
(?x)^( dev/tools/dolibarr-postgres2mysql.php |test/other/test_serialize.php
|
||||
|test/phpunit/textutf8.txt |test/phpunit/textiso.txt |htdocs/includes/.*
|
||||
|htdocs/modulebuilder/template/.* |dev/build/debian/dolibarr.postrm |dev/build/debian/dolibarr.postinst
|
||||
|dev/build/debian/dolibarr.config )$
|
||||
# Fix the first UTF8 byte
|
||||
- id: fix-byte-order-marker
|
||||
# Check that there are no files that have are the same when uppercased (conflict on windows)
|
||||
- id: check-case-conflict
|
||||
|
||||
# Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos
|
||||
- repo: https://github.com/gitleaks/gitleaks.git
|
||||
rev: v8.24.0
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
|
||||
# Check github actions
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: v1.7.7
|
||||
hooks:
|
||||
- id: actionlint
|
||||
|
||||
# Beautify shell scripts
|
||||
- repo: https://github.com/lovesegfault/beautysh.git
|
||||
rev: v6.2.1
|
||||
hooks:
|
||||
- id: beautysh
|
||||
exclude: |
|
||||
(?x)^(dev/setup/git/hooks/pre-commit
|
||||
)$
|
||||
args: [--tab]
|
||||
|
||||
# Run local script
|
||||
#
|
||||
# For example, to update the license in edited files, you could add to local.sh:
|
||||
#
|
||||
# ```shell
|
||||
# #!/bin/bash
|
||||
# MYDIR=$(dirname "$0")
|
||||
# git diff HEAD --name-only | grep -v includes | \
|
||||
# xargs "$MYDIR/dev/tools/updatelicense.php"
|
||||
# ```
|
||||
- repo: local
|
||||
hooks:
|
||||
- name: Find missing/unused/duplicate language keys
|
||||
id: check-translations
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/translation/sanity_check_trans_missing_unused.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: local-precommit-script
|
||||
name: Run local script before commit if it exists
|
||||
language: system
|
||||
entry: bash -c '[ ! -x local.sh ] || ./local.sh'
|
||||
pass_filenames: false
|
||||
- id: duplicate-lang-lines
|
||||
stages: [manual]
|
||||
name: Find duplicate language lines
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelanglines.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: duplicate-lang-keys
|
||||
stages: [manual]
|
||||
name: Find duplicate language keys
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelangkey.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: fix-alt-languages
|
||||
stages: [manual]
|
||||
name: Fix alt languages
|
||||
# Selection: see fixaltlanguages.sh script
|
||||
files: (?x)^(htdocs/langs/(e[lnstu]|k[akmno]|s[lqrv]|b[nrs]|c[asy]|n[bel]|[ip]t|a[mr]|d[ae]|f[ar]|h[ei]|m[sy]|t[ag]|u[kr]|gl|ja|lo|ru|vi|zh)_[^/]*/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixaltlanguages_pre-commit.sh
|
||||
pass_filenames: true
|
||||
|
||||
# Check PHP syntax
|
||||
- repo: https://github.com/mdeweerd/pre-commit-php
|
||||
rev: v1.6.8
|
||||
hooks:
|
||||
- id: php-cbf
|
||||
files: \.(php)$
|
||||
args: [--standard=dev/setup/codesniffer/ruleset.xml]
|
||||
- id: php-cs
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/.*)$
|
||||
files: \.(php)$
|
||||
args:
|
||||
[
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
]
|
||||
- alias: php-cs-with-cache
|
||||
id: php-cs
|
||||
# Configuration for ci - run on all files with cache
|
||||
stages: [manual]
|
||||
args:
|
||||
[
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
--cache=.cache/pre-commit/dolibarr-php-cs.cache,
|
||||
.,
|
||||
]
|
||||
pass_filenames: false # Run on all files
|
||||
- id: php-lint
|
||||
exclude:
|
||||
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
|
||||
- id: php-stan
|
||||
stages: [manual]
|
||||
files: \.(php)$
|
||||
|
||||
# Prettier (format code, only for non common files)
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: prettier
|
||||
stages: [manual]
|
||||
exclude:
|
||||
(?x)^( .*\.(phar |min\.css |lock) |htdocs/(includes|theme/common)/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- php
|
||||
- executable
|
||||
- binary
|
||||
- shell
|
||||
- javascript
|
||||
- markdown
|
||||
- html
|
||||
- less
|
||||
- plain-text
|
||||
- scss
|
||||
- css
|
||||
- yaml
|
||||
|
||||
# Check format of yaml files
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.36.2
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args:
|
||||
- --no-warnings
|
||||
- -d
|
||||
- "{extends: relaxed, rules: {line-length: {max: 120}}}"
|
||||
|
||||
# Execute codespell to fix typo errors (setup of codespell into dev/tools/codespell/)
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.4.1
|
||||
hooks:
|
||||
- id: codespell
|
||||
# Due to a current limitation of configuration files,
|
||||
# we can specify two dicts only on the CLI.
|
||||
# You can update the contents of the exclude-file codespell-lines-ignore with the script
|
||||
# dev/tools/codespell/addCodespellIgnores.sh
|
||||
args:
|
||||
- -D
|
||||
- "-"
|
||||
- -D
|
||||
- dev/tools/codespell/codespell-dict.txt
|
||||
- -I
|
||||
- dev/tools/codespell/codespell-ignore.txt
|
||||
- -x
|
||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||
exclude_types: [image]
|
||||
exclude: (?x)^(.phan/stubs/.*|phpstan\.neon.*)$
|
||||
additional_dependencies: [tomli]
|
||||
- alias: codespell-lang-en_US
|
||||
# Only for translations with specialised exceptions
|
||||
# -D contains predefined conversion dictionaries
|
||||
# -L is to ignore some words
|
||||
id: codespell
|
||||
files: ^htdocs/langs/en_US/.*$
|
||||
args:
|
||||
- -D
|
||||
- "-"
|
||||
- -D
|
||||
- dev/tools/codespell/codespell-dict.txt
|
||||
- -L
|
||||
- informations,medias,uptodate,reenable,crypted,developpers
|
||||
- -L
|
||||
- creat,unitl,alltime,datas,referers
|
||||
- -I
|
||||
- dev/tools/codespell/codespell-ignore.txt
|
||||
- -x
|
||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||
- --uri-ignore-words-list
|
||||
- ned
|
||||
|
||||
# Check some shell scripts
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.10.0.1
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
args: [-W, "100"]
|
||||
|
||||
# Check sql file syntax
|
||||
- repo: https://github.com/sqlfluff/sqlfluff
|
||||
rev: 3.3.1
|
||||
hooks:
|
||||
- id: sqlfluff-lint
|
||||
stages: [pre-commit, manual] # manual needed for ci
|
||||
exclude: (?x)^
|
||||
(dev/initdemo/mysqldump_.*\.sql
|
||||
|htdocs/core/menus/init_menu_auguria\.sql
|
||||
|htdocs/includes/.*
|
||||
|htdocs/install/doctemplates/websites/.*_template
|
||||
|htdocs/install/doctemplates/websites/website_template.*\.sql
|
||||
|htdocs/install/mysql/data/llx_20_c_departements\.sql
|
||||
|htdocs/install/mysql/data/llx_accounting_account_.*\.sql
|
||||
|htdocs/install/mysql/migration/3\..*\.sql
|
||||
|htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql
|
||||
|htdocs/install/mysql/migration/repair\.sql
|
||||
|htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql
|
||||
|htdocs/install/mysql/tables/llx_categorie.*\.key\.sql
|
||||
|htdocs/install/mysql/tables/llx_rights_def\.key\.sql
|
||||
|htdocs/install/pgsql/functions/functions.*\.sql
|
||||
|htdocs/modulebuilder/template/sql/.*\.sql
|
||||
)$
|
||||
221
.scrutinizer.yml
Normal file
221
.scrutinizer.yml
Normal file
@@ -0,0 +1,221 @@
|
||||
# .scrutinizer.yml
|
||||
#build:
|
||||
# - php-scrutinizer-run
|
||||
build:
|
||||
nodes:
|
||||
analysis:
|
||||
tests:
|
||||
override:
|
||||
- php-scrutinizer-run
|
||||
|
||||
imports:
|
||||
- javascript
|
||||
- php
|
||||
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- documents/*
|
||||
- htdocs/includes/*
|
||||
- node_modules/*
|
||||
- test/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
|
||||
tools:
|
||||
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
|
||||
php_analyzer:
|
||||
enabled: true
|
||||
extensions:
|
||||
- php
|
||||
dependency_paths:
|
||||
- htdocs/includes/
|
||||
filter:
|
||||
excluded_paths:
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
- htdocs/includes/*
|
||||
- htdocs/core/class/lessc.class.php
|
||||
paths:
|
||||
- htdocs/
|
||||
- scripts/
|
||||
config:
|
||||
parameter_reference_check:
|
||||
enabled: true
|
||||
checkstyle:
|
||||
enabled: false
|
||||
no_trailing_whitespace: true
|
||||
naming:
|
||||
enabled: true
|
||||
local_variable: ^[a-z][a-zA-Z0-9]*$
|
||||
abstract_class_name: ^Abstract|Factory$
|
||||
utility_class_name: Utils?$
|
||||
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
|
||||
property_name: ^[a-z][a-zA-Z0-9]*$
|
||||
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
|
||||
parameter_name: ^[a-z][a-zA-Z0-9]*$
|
||||
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
|
||||
type_name: ^[A-Z][a-zA-Z0-9]*$
|
||||
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
|
||||
isser_method_name: ^(?:is|has|should|may|supports)
|
||||
unreachable_code:
|
||||
enabled: true
|
||||
check_access_control:
|
||||
enabled: true
|
||||
typo_checks:
|
||||
enabled: true
|
||||
check_variables:
|
||||
enabled: true
|
||||
check_calls:
|
||||
enabled: true
|
||||
too_many_arguments: true
|
||||
missing_argument: true
|
||||
argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict"
|
||||
suspicious_code:
|
||||
enabled: true
|
||||
overriding_parameter: false
|
||||
overriding_closure_use: true
|
||||
parameter_closure_use_conflict: true
|
||||
parameter_multiple_times: true
|
||||
non_existent_class_in_instanceof_check: true
|
||||
non_existent_class_in_catch_clause: true
|
||||
assignment_of_null_return: true
|
||||
non_commented_switch_fallthrough: true
|
||||
non_commented_empty_catch_block: true
|
||||
overriding_private_members: true
|
||||
use_statement_alias_conflict: true
|
||||
precedence_in_condition_assignment: true
|
||||
dead_assignments:
|
||||
enabled: true
|
||||
verify_php_doc_comments:
|
||||
enabled: false
|
||||
parameters: true
|
||||
return: true
|
||||
suggest_more_specific_types: true
|
||||
ask_for_return_if_not_inferrable: true
|
||||
ask_for_param_type_annotation: true
|
||||
loops_must_use_braces:
|
||||
enabled: true
|
||||
check_usage_context:
|
||||
enabled: true
|
||||
simplify_boolean_return:
|
||||
enabled: false
|
||||
phpunit_checks:
|
||||
enabled: false
|
||||
reflection_checks:
|
||||
enabled: true
|
||||
|
||||
# Checks Common Precedence Mistakes
|
||||
precedence_checks:
|
||||
enabled: true
|
||||
assignment_in_condition: true
|
||||
comparison_of_bit_result: true
|
||||
basic_semantic_checks:
|
||||
enabled: true
|
||||
# Disabled unused code. In most cases, we want to keep it.
|
||||
unused_code:
|
||||
enabled: false
|
||||
deprecation_checks:
|
||||
enabled: true
|
||||
useless_function_calls:
|
||||
enabled: true
|
||||
metrics_lack_of_cohesion_methods:
|
||||
enabled: true
|
||||
metrics_coupling:
|
||||
enabled: true
|
||||
stable_code:
|
||||
namespace_prefixes: []
|
||||
classes: []
|
||||
doctrine_parameter_binding:
|
||||
enabled: false
|
||||
doctrine_entity_manager_injection:
|
||||
enabled: false
|
||||
symfony_request_injection:
|
||||
enabled: false
|
||||
doc_comment_fixes:
|
||||
enabled: true
|
||||
reflection_fixes:
|
||||
enabled: false
|
||||
use_statement_fixes:
|
||||
enabled: true
|
||||
remove_unused: true
|
||||
# Whether you would like multiple imports in one USE statement to be preserved, e.g. ``use A, B;``.
|
||||
preserve_multiple: false
|
||||
# Whether you would like to preserve blank lines between use statements.
|
||||
preserve_blanklines: false
|
||||
order_alphabetically: false
|
||||
# To use specific config for a specific path, use path_configs: (see example on page https://scrutinizer-ci.com/docs/configuration/tool_config_structure)
|
||||
|
||||
# php_depend
|
||||
php_pdepend:
|
||||
enabled: false
|
||||
configuration_file: null
|
||||
suffixes:
|
||||
- php
|
||||
excluded_dirs: { }
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# change tracking
|
||||
php_changetracking:
|
||||
enabled: false
|
||||
bug_patterns:
|
||||
- '\bfix(?:es|ed)?\b'
|
||||
feature_patterns:
|
||||
- '\badd(?:s|ed)?\b'
|
||||
- '\bimplement(?:s|ed)?\b'
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# Similar code detection
|
||||
php_sim:
|
||||
enabled: false
|
||||
min_mass: 30
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# Coding-Style / Bug Detection
|
||||
js_hint:
|
||||
enabled: false
|
||||
use_native_config: true
|
||||
extensions:
|
||||
- js
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
config: { }
|
||||
path_configs: { }
|
||||
|
||||
|
||||
before_commands: { }
|
||||
after_commands: { }
|
||||
artifacts: { }
|
||||
build_failure_conditions: { }
|
||||
14
.stickler.yml
Normal file
14
.stickler.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
linters:
|
||||
phpcs:
|
||||
standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
extensions: 'php'
|
||||
tab_width: 4
|
||||
fixer: true
|
||||
|
||||
fixers:
|
||||
enable: true
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- 'htdocs/includes/*'
|
||||
769
.travis.yml
769
.travis.yml
@@ -2,13 +2,14 @@
|
||||
# from Dolibarr GitHub repository.
|
||||
# For syntax, see https://docs.travis-ci.com/user/languages/php/
|
||||
|
||||
# We use dist: focal = 20.04, jammy = 22.04
|
||||
# We use dist: xenial to have php 5.6+ available
|
||||
os: linux
|
||||
dist: jammy
|
||||
dist: xenial
|
||||
#dist: bionic
|
||||
|
||||
language: generic
|
||||
language: php
|
||||
|
||||
#scan_logs: false
|
||||
scan_logs: false
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
@@ -16,47 +17,47 @@ git:
|
||||
# Start on every boot
|
||||
services:
|
||||
- memcached
|
||||
#- mysql
|
||||
- mysql
|
||||
- postgresql
|
||||
|
||||
|
||||
addons:
|
||||
mariadb: '10.6'
|
||||
|
||||
# Force postgresql to 9.4 (the oldest availablable on xenial)
|
||||
postgresql: '9.4'
|
||||
apt:
|
||||
sources:
|
||||
# To use the last version of pgloader, we add repo of postgresql with a name available in http://apt.postgresql.org/pub/repos/apt/
|
||||
- pgdg-xenial
|
||||
packages:
|
||||
# We need a webserver to test the webservices
|
||||
# Let's install Apache with.
|
||||
- apache2
|
||||
# mod_php is not supported by Travis. Add fcgi. We install FPM later on.
|
||||
- libapache2-mod-fastcgi
|
||||
# We need pgloader for import mysql database into pgsql
|
||||
- pgloader
|
||||
|
||||
env:
|
||||
global:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=true
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- ~/.cache
|
||||
|
||||
- DEBUG=false
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: 'latest'
|
||||
#allow_failures:
|
||||
#- php: nightly
|
||||
include:
|
||||
- stage: PHP min and max
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = push
|
||||
php: '7.2'
|
||||
env:
|
||||
- DB=postgresql
|
||||
- TRAVIS_PHP_VERSION=7.2
|
||||
- stage: PHP min and max
|
||||
php: '5.6'
|
||||
env: DB=postgresql
|
||||
- stage: PHP 5.6-7.4
|
||||
if: type = pull_request OR type = push
|
||||
php: '8.4'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.4
|
||||
- stage: PHP latest
|
||||
php: '7.4.22'
|
||||
env: DB=mysql
|
||||
- stage: PHP Dev
|
||||
if: type = push AND branch = develop
|
||||
php: 'latest'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=latest
|
||||
php: nightly
|
||||
env: DB=mysql
|
||||
|
||||
notifications:
|
||||
email:
|
||||
@@ -69,135 +70,60 @@ notifications:
|
||||
on_failure: always
|
||||
use_notice: true
|
||||
|
||||
|
||||
before_install:
|
||||
- |
|
||||
echo "Remove awful phpenv and install packages"
|
||||
sudo rm -fr ~/.phpenv
|
||||
sudo rm -fr /root/.phpenv
|
||||
sudo add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
echo TRAVIS_PHP_VERSION=$TRAVIS_PHP_VERSION
|
||||
|
||||
- |
|
||||
echo Install packages for PHP
|
||||
sudo apt-get install -y pgloader memcached
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo apt install unzip apache2 php7.2 php7.2-cli php7.2-curl php7.2-mysql php7.2-pgsql php7.2-gd php7.2-imap php7.2-intl php7.2-ldap php7.2-xml php7.2-mbstring php7.2-xml php7.2-zip libapache2-mod-php7.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
|
||||
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.4' ]; then
|
||||
sudo apt install unzip apache2 php8.4 php8.4-cli php8.4-curl php8.4-mysql php8.4-pgsql php8.4-gd php8.4-imap php8.4-intl php8.4-ldap php8.4-xml php8.4-mbstring php8.4-xml php8.4-zip libapache2-mod-php8.4
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'latest' ]; then
|
||||
sudo apt install unzip apache2 php8.4 php8.4-cli php8.4-curl php8.4-mysql php8.4-pgsql php8.4-gd php8.4-imap php8.4-intl php8.4-ldap php8.4-xml php8.4-mbstring php8.4-xml php8.4-zip libapache2-mod-php8.4
|
||||
fi
|
||||
|
||||
- |
|
||||
echo Install pgsql if run is for pgsql
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
#ps fauxww | grep postgres
|
||||
ls /etc/postgresql/13/main/
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/14/main/pg_hba.conf
|
||||
|
||||
sudo service postgresql restart
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c "CREATE USER travis WITH ENCRYPTED PASSWORD 'travis';"
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'GRANT ALL PRIVILEGES ON DATABASE travis TO travis;'
|
||||
|
||||
psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A
|
||||
fi
|
||||
echo "Disabling Xdebug for composer"
|
||||
export PHP_VERSION_NAME=$(phpenv version-name)
|
||||
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini
|
||||
phpenv config-rm xdebug.ini
|
||||
echo
|
||||
|
||||
install:
|
||||
- |
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.0
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.2
|
||||
fi
|
||||
php -i | head -
|
||||
|
||||
- |
|
||||
echo "Updating Composer config"
|
||||
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
|
||||
HASH=`curl -sS https://composer.github.io/installer.sig`
|
||||
echo $HASH
|
||||
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
|
||||
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
sudo chmod -R a+rwx /usr/local/bin/composer
|
||||
|
||||
#sudo apt install composer
|
||||
echo "Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
|
||||
rm $TRAVIS_BUILD_DIR/composer.json
|
||||
rm $TRAVIS_BUILD_DIR/composer.lock
|
||||
composer -V
|
||||
sudo composer -n config -g vendor-dir htdocs/includes
|
||||
sudo chmod -R a+rwx /home/travis/.config/composer
|
||||
composer self-update 2.4.4
|
||||
#composer -n init
|
||||
#composer -n config vendor-dir htdocs/includes
|
||||
composer -n config -g vendor-dir htdocs/includes
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION"
|
||||
echo "(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo composer self-update 2.2.18
|
||||
composer -n require phpunit/phpunit ^7.5 \
|
||||
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION"
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then
|
||||
composer -n require phpunit/phpunit ^5 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
|
||||
sudo composer self-update 2.2.18
|
||||
composer -n require phpunit/phpunit ^7.5 \
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
composer -n require phpunit/phpunit ^6 \
|
||||
php-parallel-lint/php-parallel-lint ^1 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
|
||||
composer -n require phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = '8.4' ] || [ "$TRAVIS_PHP_VERSION" = 'latest' ]; then
|
||||
sudo composer self-update 2.4.4
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
php-parallel-lint/php-console-highlighter ^0 \
|
||||
php-parallel-lint/php-var-dump-check ~0.4 \
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
|
||||
# Remove non expected files
|
||||
rm -fr /home/travis/build/Dolibarr/dolibarr/htdocs/includes/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Adding path of binaries tools installed by composer to the PATH"
|
||||
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
|
||||
echo $PATH
|
||||
ls $TRAVIS_BUILD_DIR/htdocs/includes
|
||||
ls $TRAVIS_BUILD_DIR/vendor
|
||||
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
|
||||
echo
|
||||
|
||||
@@ -205,11 +131,24 @@ install:
|
||||
|
||||
before_script:
|
||||
- |
|
||||
echo Start before_script
|
||||
echo Start travis
|
||||
echo Current dir is `pwd`
|
||||
echo Home dir is `echo ~`
|
||||
echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR
|
||||
|
||||
- |
|
||||
echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit"
|
||||
phpenv config-add /tmp/xdebug.ini
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up PHP"
|
||||
echo
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
phpenv rehash
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Versions information"
|
||||
echo
|
||||
@@ -225,10 +164,6 @@ before_script:
|
||||
which phpcs
|
||||
phpcs --version | head -
|
||||
phpcs -i | head -
|
||||
# Check PHP Vardump check version
|
||||
echo "PHP Vardump check version"
|
||||
which var-dump-check
|
||||
var-dump-check --version
|
||||
# Check PHPUnit version
|
||||
echo "PHPUnit version"
|
||||
which phpunit
|
||||
@@ -239,77 +174,53 @@ before_script:
|
||||
# Check Database
|
||||
echo "Database version"
|
||||
mysql --version | head -
|
||||
mysql -e "SELECT VERSION();" | head -
|
||||
psql --version
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "Check pgloader version"
|
||||
pgloader --version
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Setting up database"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL stop"
|
||||
sudo systemctl stop mariadb.service
|
||||
echo "MySQL restart without pass"
|
||||
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa
|
||||
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
|
||||
sleep 3
|
||||
sudo ps fauxww
|
||||
echo "MySQL set root password"
|
||||
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;"
|
||||
echo "MySQL grant"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;'
|
||||
echo "MySQL list current users"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
|
||||
echo "List pid file"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
|
||||
|
||||
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
|
||||
#sudo systemctl start mariadb
|
||||
|
||||
echo "MySQL grant"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
echo "MySQL flush"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
|
||||
|
||||
echo "MySQL load sql"
|
||||
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
echo "MySQL"
|
||||
mysql -u root -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -u root -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -u root -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -u root -e 'FLUSH PRIVILEGES;'
|
||||
mysql -u root -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo "PGSQL"
|
||||
sudo mkdir -p /tmp/pgloader
|
||||
sudo chmod -R a+rwx /tmp/pgloader/
|
||||
sudo pgloader 'mysql://root:password@127.0.0.1/travis' 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
#echo '\d llx_c_country' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
# Create pgsql compatibility functions
|
||||
echo "Load functions.sql (may generated errors for tables that does not exists yet)"
|
||||
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql
|
||||
#psql -c 'create database travis;' -U postgres
|
||||
#psql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/dolibarr_src postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dest
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql://postgres@/travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql -U postgres travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql -U postgres travis
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
export CONF_FILE=htdocs/conf/conf.php
|
||||
echo "Setting up Dolibarr '$CONF_FILE'"
|
||||
echo "Setting up Dolibarr $CONF_FILE"
|
||||
echo '<?php' > $CONF_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=3306';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'root\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'password\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=5432';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_user=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_pass=\'postgres\'';' >> $CONF_FILE
|
||||
echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE
|
||||
fi
|
||||
echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE
|
||||
cat $CONF_FILE
|
||||
@@ -317,297 +228,247 @@ before_script:
|
||||
|
||||
- |
|
||||
echo "Create documents directory and set permissions"
|
||||
# Add admin/temp subdirectory needed for unit tests
|
||||
# and admin/temp subdirectory needed for unit tests
|
||||
mkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp
|
||||
sudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents
|
||||
echo "***** First line of dolibarr.log" > $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
echo
|
||||
|
||||
|
||||
- echo "Setting up Apache + FPM"
|
||||
# enable php-fpm
|
||||
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
|
||||
- |
|
||||
echo "Setting up Apache"
|
||||
sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
sudo cp -f dev/build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
sudo service apache2 restart
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
# Copy the included pool
|
||||
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
|
||||
fi
|
||||
- sudo a2enmod rewrite actions fastcgi alias
|
||||
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
|
||||
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
|
||||
# configure apache virtual hosts
|
||||
- sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
- sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
- sudo service apache2 restart
|
||||
|
||||
|
||||
|
||||
script:
|
||||
- |
|
||||
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - --debug http://127.0.0.1 > test.html
|
||||
head -n 200 test.html
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking webserver availability by a wget -O - http://127.0.0.1"
|
||||
# Ensure we stop on error with set -e
|
||||
set +e
|
||||
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
|
||||
wget -O - http://127.0.0.1 > test.html
|
||||
head test.html
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
#parallel-lint --exclude htdocs/includes --blame .
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
CACHE_OPT="--cache=${HOME}/.cache/dolibarr-phpcs-${TRAVIS_PHP_VERSION}.cache"
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Checking coding style (only for Pull Requests builds and 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
|
||||
- |
|
||||
export INSTALL_FORCED_FILE=htdocs/install/install.forced.php
|
||||
echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation"
|
||||
# Ensure we catch errors
|
||||
set +e
|
||||
echo '<?php ' > $INSTALL_FORCED_FILE
|
||||
echo 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then
|
||||
echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=3306';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_port=5432';' >> $INSTALL_FORCED_FILE
|
||||
fi
|
||||
echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
|
||||
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
|
||||
#cat $INSTALL_FORCED_FILE
|
||||
echo
|
||||
#- |
|
||||
# echo "Installing Dolibarr"
|
||||
# cd htdocs/install
|
||||
# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log
|
||||
# php step2.php set >> $TRAVIS_BUILD_DIR/install.log
|
||||
# if [ "$?" -ne "0" ]; then
|
||||
# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS"
|
||||
# cat $TRAVIS_BUILD_DIR/install.log
|
||||
# exit 1
|
||||
# fi
|
||||
# cd ../..
|
||||
# rm $INSTALL_FORCED_FILE
|
||||
# #cat $TRAVIS_BUILD_DIR/install.log
|
||||
# set +e
|
||||
# echo
|
||||
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.
|
||||
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
|
||||
# I disable stop on error to be able to continue.
|
||||
set +e
|
||||
cd htdocs/install
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||
php upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log
|
||||
php upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log
|
||||
php step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log
|
||||
php upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log
|
||||
php upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log
|
||||
php step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log
|
||||
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log
|
||||
php upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log
|
||||
php step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log
|
||||
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
|
||||
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
|
||||
php upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
php upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log
|
||||
php step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-3.log
|
||||
php upgrade.php 20.0.0 21.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade20002100.log || cat $TRAVIS_BUILD_DIR/upgrade20002100.log
|
||||
php upgrade2.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-2.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-2.log
|
||||
php step5.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-3.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-3.log
|
||||
php upgrade.php 21.0.0 22.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade21002200.log || cat $TRAVIS_BUILD_DIR/upgrade21002200.log
|
||||
php upgrade2.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-2.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-2.log
|
||||
php step5.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-3.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-3.log
|
||||
php upgrade.php 22.0.0 23.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade22002300.log || cat $TRAVIS_BUILD_DIR/upgrade22002300.log
|
||||
php upgrade2.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-2.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-2.log
|
||||
php step5.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-3.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-3.log
|
||||
set +e
|
||||
echo
|
||||
- |
|
||||
echo "Setting up database to test migrations"
|
||||
if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then
|
||||
echo "MySQL"
|
||||
mysql -e 'DROP DATABASE IF EXISTS travis;'
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS travis;'
|
||||
mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'
|
||||
mysql -e 'FLUSH PRIVILEGES;'
|
||||
mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
fi
|
||||
if [ "$DB" = 'postgresql' ]; then
|
||||
#pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
|
||||
#pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr
|
||||
echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
pgloader mysql://root@127.0.0.1/travis postgresql:///travis
|
||||
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis
|
||||
echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis
|
||||
#echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis
|
||||
#echo 'select * from information_schema.table_constraints;' | psql travis
|
||||
#echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis
|
||||
fi
|
||||
echo
|
||||
|
||||
- |
|
||||
echo Show some debug info like table content or log
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
echo
|
||||
- |
|
||||
echo "Upgrading Dolibarr"
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see log files.
|
||||
set +e
|
||||
cd htdocs/install
|
||||
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
|
||||
php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log
|
||||
php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log
|
||||
php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log
|
||||
php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log
|
||||
php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log
|
||||
php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log
|
||||
php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log
|
||||
php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log
|
||||
php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log
|
||||
php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log
|
||||
php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log
|
||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||
php upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||
php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
|
||||
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log
|
||||
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
|
||||
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
|
||||
php upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log
|
||||
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
|
||||
php upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log
|
||||
php upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log
|
||||
php step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log
|
||||
php upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log
|
||||
php upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log
|
||||
php step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log
|
||||
php upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log
|
||||
php upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log
|
||||
php step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log
|
||||
php upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log
|
||||
php upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log
|
||||
php step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log
|
||||
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
|
||||
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
|
||||
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
|
||||
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
|
||||
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
|
||||
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
|
||||
php upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log
|
||||
php upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log
|
||||
php step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log
|
||||
php upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log
|
||||
php upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log
|
||||
php step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
|
||||
- |
|
||||
echo Result of migration scripts
|
||||
ls -alrt $TRAVIS_BUILD_DIR/
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
|
||||
echo Show content of last file
|
||||
cat $TRAVIS_BUILD_DIR/"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)"
|
||||
|
||||
- |
|
||||
echo "Enabling new modules"
|
||||
# Enable modules not enabled into original dump
|
||||
set -e
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo $?
|
||||
cd -
|
||||
set +e
|
||||
echo
|
||||
#cat /tmp/dolibarr_install.log
|
||||
cat $TRAVIS_BUILD_DIR/enablemodule.log
|
||||
echo
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Execute phpunit, check its exit status and that the phpunit output shows a test summary
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php | tee /dev/tty | grep -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" ; phpunitresult=$((PIPESTATUS[0]?PIPESTATUS[0]:PIPESTATUS[2]))
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
# Comment next line if you want to go to the end to see the dolibarr.log file.
|
||||
[ $phpunitresult == 0 ] || exit $phpunitresult
|
||||
echo
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
after_script:
|
||||
- |
|
||||
echo "After script - Output last lines of dolibarr.log"
|
||||
ls $TRAVIS_BUILD_DIR/documents
|
||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
echo "After script - Output last lines of apache error.log"
|
||||
sudo ls /var/log/apache2
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
- |
|
||||
echo "After script - Output last lines of dolibarr.log"
|
||||
ls $TRAVIS_BUILD_DIR/documents
|
||||
#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
sudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
|
||||
after_success:
|
||||
- |
|
||||
echo Success
|
||||
- |
|
||||
echo Success
|
||||
|
||||
after_failure:
|
||||
- |
|
||||
echo Failure detected, so we show samples of log to help diagnose
|
||||
# This part of code is executed only if the command that fails are enclosed with set +e
|
||||
# Show upgrade log files
|
||||
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
#do
|
||||
#echo "Debugging information for file $ficlog"
|
||||
#cat $ficlog
|
||||
#done
|
||||
# Show Apache log file
|
||||
echo "Debugging information for file apache error.log"
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging information for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging information for file mysql error.log"
|
||||
sudo tail -n 200 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
- |
|
||||
echo Failure detected, so we show samples of log to help diagnose
|
||||
# This part of code is executed only if previous command that fails are enclosed with set +e
|
||||
# Upgrade log files
|
||||
for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
do
|
||||
echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
done
|
||||
# Apache log file
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo cat /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 50 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
fi
|
||||
|
||||
322
.tx/config
322
.tx/config
@@ -1,412 +1,448 @@
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
host = https://www.transifex.com
|
||||
lang_map = uz: uz_UZ, sw: sw_SW, sr@latin: sr_RS
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:accountancy]
|
||||
[dolibarr.accountancy]
|
||||
file_filter = htdocs/langs/<lang>/accountancy.lang
|
||||
source_file = htdocs/langs/en_US/accountancy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:admin]
|
||||
[dolibarr.admin]
|
||||
file_filter = htdocs/langs/<lang>/admin.lang
|
||||
source_file = htdocs/langs/en_US/admin.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:agenda]
|
||||
[dolibarr.agenda]
|
||||
file_filter = htdocs/langs/<lang>/agenda.lang
|
||||
source_file = htdocs/langs/en_US/agenda.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:assets]
|
||||
[dolibarr.assets]
|
||||
file_filter = htdocs/langs/<lang>/assets.lang
|
||||
source_file = htdocs/langs/en_US/assets.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:banks]
|
||||
[dolibarr.banks]
|
||||
file_filter = htdocs/langs/<lang>/banks.lang
|
||||
source_file = htdocs/langs/en_US/banks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:bills]
|
||||
[dolibarr.bills]
|
||||
file_filter = htdocs/langs/<lang>/bills.lang
|
||||
source_file = htdocs/langs/en_US/bills.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:blockedlog]
|
||||
[dolibarr.blockedlog]
|
||||
file_filter = htdocs/langs/<lang>/blockedlog.lang
|
||||
source_file = htdocs/langs/en_US/blockedlog.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:boxes]
|
||||
[dolibarr.bookmarks]
|
||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.boxes]
|
||||
file_filter = htdocs/langs/<lang>/boxes.lang
|
||||
source_file = htdocs/langs/en_US/boxes.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:cashdesk]
|
||||
[dolibarr.cashdesk]
|
||||
file_filter = htdocs/langs/<lang>/cashdesk.lang
|
||||
source_file = htdocs/langs/en_US/cashdesk.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:categories]
|
||||
[dolibarr.categories]
|
||||
file_filter = htdocs/langs/<lang>/categories.lang
|
||||
source_file = htdocs/langs/en_US/categories.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:commercial]
|
||||
[dolibarr.commercial]
|
||||
file_filter = htdocs/langs/<lang>/commercial.lang
|
||||
source_file = htdocs/langs/en_US/commercial.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:companies]
|
||||
[dolibarr.companies]
|
||||
file_filter = htdocs/langs/<lang>/companies.lang
|
||||
source_file = htdocs/langs/en_US/companies.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:compta]
|
||||
[dolibarr.compta]
|
||||
file_filter = htdocs/langs/<lang>/compta.lang
|
||||
source_file = htdocs/langs/en_US/compta.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:contracts]
|
||||
[dolibarr.contracts]
|
||||
file_filter = htdocs/langs/<lang>/contracts.lang
|
||||
source_file = htdocs/langs/en_US/contracts.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:cron]
|
||||
[dolibarr.cron]
|
||||
file_filter = htdocs/langs/<lang>/cron.lang
|
||||
source_file = htdocs/langs/en_US/cron.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:datapolicy]
|
||||
file_filter = htdocs/langs/<lang>/datapolicy.lang
|
||||
source_file = htdocs/langs/en_US/datapolicy.lang
|
||||
[dolibarr.deliveries]
|
||||
file_filter = htdocs/langs/<lang>/deliveries.lang
|
||||
source_file = htdocs/langs/en_US/deliveries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:dict]
|
||||
[dolibarr.dict]
|
||||
file_filter = htdocs/langs/<lang>/dict.lang
|
||||
source_file = htdocs/langs/en_US/dict.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:donations]
|
||||
[dolibarr.donations]
|
||||
file_filter = htdocs/langs/<lang>/donations.lang
|
||||
source_file = htdocs/langs/en_US/donations.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:ecm]
|
||||
[dolibarr.ecm]
|
||||
file_filter = htdocs/langs/<lang>/ecm.lang
|
||||
source_file = htdocs/langs/en_US/ecm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:errors]
|
||||
[dolibarr.errors]
|
||||
file_filter = htdocs/langs/<lang>/errors.lang
|
||||
source_file = htdocs/langs/en_US/errors.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:eventorganization]
|
||||
[dolibarr.eventorganization]
|
||||
file_filter = htdocs/langs/<lang>/eventorganization.lang
|
||||
source_file = htdocs/langs/en_US/eventorganization.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:exports]
|
||||
[dolibarr.exports]
|
||||
file_filter = htdocs/langs/<lang>/exports.lang
|
||||
source_file = htdocs/langs/en_US/exports.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:holiday]
|
||||
[dolibarr.externalsite]
|
||||
file_filter = htdocs/langs/<lang>/externalsite.lang
|
||||
source_file = htdocs/langs/en_US/externalsite.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ftp]
|
||||
file_filter = htdocs/langs/<lang>/ftp.lang
|
||||
source_file = htdocs/langs/en_US/ftp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.help]
|
||||
file_filter = htdocs/langs/<lang>/help.lang
|
||||
source_file = htdocs/langs/en_US/help.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.holiday]
|
||||
file_filter = htdocs/langs/<lang>/holiday.lang
|
||||
source_file = htdocs/langs/en_US/holiday.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:hrm]
|
||||
[dolibarr.hrm]
|
||||
file_filter = htdocs/langs/<lang>/hrm.lang
|
||||
source_file = htdocs/langs/en_US/hrm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:install]
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:interventions]
|
||||
[dolibarr.interventions]
|
||||
file_filter = htdocs/langs/<lang>/interventions.lang
|
||||
source_file = htdocs/langs/en_US/interventions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:intracommreport]
|
||||
[dolibarr.intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:knowledgemanagement]
|
||||
[dolibarr.knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:languages-not-res]
|
||||
[dolibarr.languages-not-res]
|
||||
file_filter = htdocs/langs/<lang>/languages.lang
|
||||
source_file = htdocs/langs/en_US/languages.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:ldap]
|
||||
[dolibarr.ldap]
|
||||
file_filter = htdocs/langs/<lang>/ldap.lang
|
||||
source_file = htdocs/langs/en_US/ldap.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:loan]
|
||||
[dolibarr.link]
|
||||
file_filter = htdocs/langs/<lang>/link.lang
|
||||
source_file = htdocs/langs/en_US/link.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:mailmanspip]
|
||||
[dolibarr.mailmanspip]
|
||||
file_filter = htdocs/langs/<lang>/mailmanspip.lang
|
||||
source_file = htdocs/langs/en_US/mailmanspip.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:mails]
|
||||
[dolibarr.mails]
|
||||
file_filter = htdocs/langs/<lang>/mails.lang
|
||||
source_file = htdocs/langs/en_US/mails.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:main]
|
||||
[dolibarr.main]
|
||||
file_filter = htdocs/langs/<lang>/main.lang
|
||||
source_file = htdocs/langs/en_US/main.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:margins]
|
||||
[dolibarr.margins]
|
||||
file_filter = htdocs/langs/<lang>/margins.lang
|
||||
source_file = htdocs/langs/en_US/margins.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:members]
|
||||
[dolibarr.members]
|
||||
file_filter = htdocs/langs/<lang>/members.lang
|
||||
source_file = htdocs/langs/en_US/members.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:modulebuilder]
|
||||
[dolibarr.modulebuilder]
|
||||
file_filter = htdocs/langs/<lang>/modulebuilder.lang
|
||||
source_file = htdocs/langs/en_US/modulebuilder.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:mrp]
|
||||
[dolibarr.mrp]
|
||||
file_filter = htdocs/langs/<lang>/mrp.lang
|
||||
source_file = htdocs/langs/en_US/mrp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:multicurrency]
|
||||
[dolibarr.multicurrency]
|
||||
file_filter = htdocs/langs/<lang>/multicurrency.lang
|
||||
source_file = htdocs/langs/en_US/multicurrency.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:oauth]
|
||||
[dolibarr.oauth]
|
||||
file_filter = htdocs/langs/<lang>/oauth.lang
|
||||
source_file = htdocs/langs/en_US/oauth.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:opensurvey]
|
||||
[dolibarr.opensurvey]
|
||||
file_filter = htdocs/langs/<lang>/opensurvey.lang
|
||||
source_file = htdocs/langs/en_US/opensurvey.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:orders]
|
||||
[dolibarr.orders]
|
||||
file_filter = htdocs/langs/<lang>/orders.lang
|
||||
source_file = htdocs/langs/en_US/orders.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:other]
|
||||
[dolibarr.other]
|
||||
file_filter = htdocs/langs/<lang>/other.lang
|
||||
source_file = htdocs/langs/en_US/other.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:partnership]
|
||||
[dolibarr.partnership]
|
||||
file_filter = htdocs/langs/<lang>/partnership.lang
|
||||
source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:paypal]
|
||||
[dolibarr.paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.paypal]
|
||||
file_filter = htdocs/langs/<lang>/paypal.lang
|
||||
source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:printing]
|
||||
[dolibarr.printing]
|
||||
file_filter = htdocs/langs/<lang>/printing.lang
|
||||
source_file = htdocs/langs/en_US/printing.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:productbatch]
|
||||
[dolibarr.productbatch]
|
||||
file_filter = htdocs/langs/<lang>/productbatch.lang
|
||||
source_file = htdocs/langs/en_US/productbatch.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:products]
|
||||
[dolibarr.products]
|
||||
file_filter = htdocs/langs/<lang>/products.lang
|
||||
source_file = htdocs/langs/en_US/products.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:projects]
|
||||
[dolibarr.projects]
|
||||
file_filter = htdocs/langs/<lang>/projects.lang
|
||||
source_file = htdocs/langs/en_US/projects.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:propal]
|
||||
[dolibarr.propal]
|
||||
file_filter = htdocs/langs/<lang>/propal.lang
|
||||
source_file = htdocs/langs/en_US/propal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:receiptprinter]
|
||||
[dolibarr.receiptprinter]
|
||||
file_filter = htdocs/langs/<lang>/receiptprinter.lang
|
||||
source_file = htdocs/langs/en_US/receiptprinter.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:receptions]
|
||||
[dolibarr.receptions]
|
||||
file_filter = htdocs/langs/<lang>/receptions.lang
|
||||
source_file = htdocs/langs/en_US/receptions.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:recruitment]
|
||||
[dolibarr.recruitment]
|
||||
file_filter = htdocs/langs/<lang>/recruitment.lang
|
||||
source_file = htdocs/langs/en_US/recruitment.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:resource]
|
||||
[dolibarr.resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:salaries]
|
||||
[dolibarr.salaries]
|
||||
file_filter = htdocs/langs/<lang>/salaries.lang
|
||||
source_file = htdocs/langs/en_US/salaries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:sendings]
|
||||
[dolibarr.sendings]
|
||||
file_filter = htdocs/langs/<lang>/sendings.lang
|
||||
source_file = htdocs/langs/en_US/sendings.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:sms]
|
||||
[dolibarr.sms]
|
||||
file_filter = htdocs/langs/<lang>/sms.lang
|
||||
source_file = htdocs/langs/en_US/sms.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:stocks]
|
||||
[dolibarr.stocks]
|
||||
file_filter = htdocs/langs/<lang>/stocks.lang
|
||||
source_file = htdocs/langs/en_US/stocks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:stripe]
|
||||
[dolibarr.stripe]
|
||||
file_filter = htdocs/langs/<lang>/stripe.lang
|
||||
source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:subtotals]
|
||||
file_filter = htdocs/langs/<lang>/subtotals.lang
|
||||
source_file = htdocs/langs/en_US/subtotals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:supplier_proposal]
|
||||
[dolibarr.supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:suppliers]
|
||||
[dolibarr.suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:ticket]
|
||||
[dolibarr.ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:trips]
|
||||
[dolibarr.trips]
|
||||
file_filter = htdocs/langs/<lang>/trips.lang
|
||||
source_file = htdocs/langs/en_US/trips.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:users]
|
||||
[dolibarr.users]
|
||||
file_filter = htdocs/langs/<lang>/users.lang
|
||||
source_file = htdocs/langs/en_US/users.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:website]
|
||||
[dolibarr.website]
|
||||
file_filter = htdocs/langs/<lang>/website.lang
|
||||
source_file = htdocs/langs/en_US/website.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:withdrawals]
|
||||
[dolibarr.withdrawals]
|
||||
file_filter = htdocs/langs/<lang>/withdrawals.lang
|
||||
source_file = htdocs/langs/en_US/withdrawals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:workflow]
|
||||
[dolibarr.workflow]
|
||||
file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.zapier]
|
||||
file_filter = htdocs/langs/<lang>/zapier.lang
|
||||
source_file = htdocs/langs/en_US/zapier.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
54
COPYRIGHT
54
COPYRIGHT
@@ -13,7 +13,7 @@ The Dolibarr images resources (available in the doc directory) is distributed un
|
||||
|
||||
|
||||
The name Dolibarr is a trademark initially registered by Laurent Destailleur and ceased to the Dolibarr foundation. You can use the name Dolibarr
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
for your own need as long as you follow the rules defined on the page https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
The use of the name DoliStore is also restricted to the same rules defined on https://wiki.dolibarr.org/index.php/Rules_to_use_the_brand_name_%22Dolibarr%22
|
||||
|
||||
|
||||
@@ -23,42 +23,37 @@ Licence of dependencies of third-party components used by Dolibarr (all compatib
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
|
||||
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
ADOdb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
GeoPHP 1.2 Modified BSD License Yes Lib to make geo convert
|
||||
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
|
||||
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
|
||||
Mobiledetect 2.8.34 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
|
||||
ParseDown 1.7.4 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.18.2 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.12.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHP-Iban 4.1.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHP-Imap 2.7.2 MIT License Yes Library to use IMAP with OAuth
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files
|
||||
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
|
||||
PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PrestaShop-WS-Lib 94feb5f OSL-3.0 No Library providing API client for Prestashop.
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/Logs 1.0 Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
Sabre 4.6.0 BSD Yes DAV support
|
||||
Sabre 3.2.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
|
||||
Stripe 10.7.0 MIT Licence Yes Library for Stripe module
|
||||
TCPDF 6.7.5 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.1.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
|
||||
Stripe 7.67.0 MIT Licence Yes Library for Stripe module
|
||||
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
JS libraries:
|
||||
Ace 1.43.12 BSD Yes JS library to get code syntaxique coloration in a textarea (Must take src dir into https://github.com/ajaxorg/ace-builds/).
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.4 MIT License Yes JS library
|
||||
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
|
||||
Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 2.9.4 MIT License Yes JS library for graph
|
||||
jQuery 3.5.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||
@@ -68,7 +63,8 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jsGanttImproved 2.8.10 BSD License Yes JS library (to build Gantt reports)
|
||||
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
|
||||
Image libraries:
|
||||
@@ -78,7 +74,7 @@ Font libraries:
|
||||
Fontawesome 5.13 Font Awesome Free Licence Yes
|
||||
|
||||
|
||||
For more licenses compatibility information: https://www.gnu.org/licenses/licenses.en.html
|
||||
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Authors
|
||||
|
||||
178
README-FR.md
Normal file
178
README-FR.md
Normal file
@@ -0,0 +1,178 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||

|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### Configuration simple
|
||||
|
||||
Si vous avez peu de compétences techniques et que vous souhaitez installer Dolibarr ERP/CRM en quelques clics, vous pouvez utiliser l'une des versions pré-packagées avec les prérequis:
|
||||
|
||||
- DoliWamp pour Windows
|
||||
- DoliDeb pour Debian ou Ubuntu
|
||||
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
|
||||
|
||||
Les packages peuvent être téléchargés à partir de [site web officiel](https://www.dolibarr.org/).
|
||||
|
||||
### Configuration avancée
|
||||
|
||||
Vous pouvez aussi utiliser un serveur Web et une base de données prise en charge (MariaDB, MySQL ou PostgreSQL) pour installer la version standard.
|
||||
|
||||
- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (où x.y est la version principale comme 3.6, 9.0, ...)
|
||||
|
||||
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
|
||||
|
||||
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
|
||||
|
||||
- Depuis votre navigateur, allez à la page "install/" de dolibarr
|
||||
|
||||
L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://localhost/dolibarr/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://yourdolibarrvirtualhost/install/`
|
||||
|
||||
- Suivez les instructions de l'installateur
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
Note: *Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
### Modules principaux (tous optionnels)
|
||||
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Gestion de catalogue de produits et services
|
||||
- Gestion des devis, propositions commerciales
|
||||
- Gestion des commandes
|
||||
- Gestion des factures clients/fournisseurs et paiements
|
||||
- Gestion des virements bancaires SEPA
|
||||
- Gestion des comptes bancaires
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congès
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- EMailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- … (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions)
|
||||
|
||||
### Autres modules
|
||||
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
- Rapports
|
||||
- Imports/Exports des données
|
||||
- Support des codes barres
|
||||
- Calcul des marges
|
||||
- Connectivité LDAP
|
||||
- Intégratn de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégation Skype
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multi-devise.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur [https://wiki.dolibarr.org/index.php/Prérequis](https://wiki.dolibarr.org/index.php/Prérequis)).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La tax espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- …
|
||||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- Dolibarr ne contient pas de module de génération de feuille de paie.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
## CONTRIBUER
|
||||
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
|
||||
|
||||
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
154
README.md
154
README.md
@@ -1,65 +1,64 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||

|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activities (contacts, quotes, invoices, orders, stocks, agenda, human resources, ecm, manufacturing…).
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
|
||||
It's an Open-Source Software suite (written in PHP with JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its license.
|
||||
You can freely use, study, modify or distribute it according to its licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or from a LAN.
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
|
||||
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
|
||||
See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) file for a full copy of the license.
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
|
||||
|
||||
|
||||
## INSTALLING
|
||||
|
||||
There is a lot of different solutions to install Dolibarr.
|
||||
### Simple setup
|
||||
|
||||
### Using packages
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM with just few clicks, you can use one of the packaged versions (see next chapter if you have IT knowledge) :
|
||||
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
|
||||
- [DoliDeb for Debian, Ubuntu](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
- The Docker image (see chapter "Using Docker")
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_DoliWamp)
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Using the generic step by step setup (recommended for IT users)
|
||||
### Advanced setup
|
||||
|
||||
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version:
|
||||
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
|
||||
- Verify that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the `dolibarr/htdocs` directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
#### Generic install steps
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 9.0, 19.0, ...)
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Set up your web server to use `dolibarr/htdocs` as root if your web server does not already define a directory to point to.
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
|
||||
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
|
||||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depend on how your web configuration directs to your dolibarr installation. It may look like:
|
||||
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
@@ -73,33 +72,24 @@ You can use any web server supporting PHP (Apache, Nginx, ...) and a supported d
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
### Using Docker images
|
||||
|
||||
Dolibarr is also available as a [Docker image](https://hub.docker.com/r/dolibarr/dolibarr). Installation instructions are available [here](https://github.com/Dolibarr/dolibarr-docker).
|
||||
|
||||
### Using ready to use SaaS/Cloud offers
|
||||
|
||||
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.
|
||||
### Saas/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Verify that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided in the new version's package.
|
||||
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
@@ -109,25 +99,23 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Product Management
|
||||
|
||||
- Products and/or Services catalogue
|
||||
- Products and/or Services catalog
|
||||
- Stock / Warehouse management + Inventory
|
||||
- Barcodes
|
||||
- Batches / Lots / Serials
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders (MO)
|
||||
- Workstations / Workplaces
|
||||
- Manufacturing Orders
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
- Customers/Prospects + Contacts management
|
||||
- Opportunities or Leads management
|
||||
- Commercial proposals management (online signing)
|
||||
- Commercial proposals management
|
||||
- Customer Orders management
|
||||
- Contracts/Subscription management
|
||||
- Interventions management
|
||||
- Ticket System (+ Knowledge management)
|
||||
- Partnership management
|
||||
- Ticket System
|
||||
- Shipping management
|
||||
- Customer Invoices/Credit notes and payment management
|
||||
- Point of Sale (POS)
|
||||
@@ -135,17 +123,17 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
Supplier/Purchase Management
|
||||
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (pricing) requests
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Reception
|
||||
- Supplier Invoices/Credit notes and payment management
|
||||
- Delivery/Receiption
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance/Accounting
|
||||
Finance / Accounting
|
||||
|
||||
- Invoices/Payments
|
||||
- Invoices / Payments
|
||||
- Bank accounts management
|
||||
- Direct debit and Credit transfer management (European SEPA)
|
||||
- Direct debit orders management (European SEPA)
|
||||
- Accounting management
|
||||
- Donations management
|
||||
- Loan management
|
||||
@@ -154,59 +142,57 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with `ical` and `vcal` import/export for third-party tools integration)
|
||||
- Shared calendar/agenda (with ical and vcal export for third party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Event organization
|
||||
- Ticket System
|
||||
- Surveys
|
||||
|
||||
HR - Human Resources Management
|
||||
HR
|
||||
|
||||
- Employee leave management
|
||||
- Employee's leave requests management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
- Timesheets
|
||||
|
||||
### Other application/modules
|
||||
|
||||
- Electronic Document Management (EDM)
|
||||
- Bookmarks
|
||||
- Bookmarks management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- Barcodes
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- Click-To-Dial integration
|
||||
- ClickToDial integration
|
||||
- Mass emailing
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Social platforms linking
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
- AI support via API
|
||||
|
||||
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
|
||||
(around 100 modules available by default, 1000+ on the addon market place)
|
||||
|
||||
### Other general features
|
||||
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Multi-users and groups with finely-grained rights
|
||||
- Localization in most major languages
|
||||
- Multi-Language Support
|
||||
- Multi-Users and groups with finely grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding an external module)
|
||||
- Very user-friendly and easy to use
|
||||
- Customizable dashboards
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Very user friendly and easy to use
|
||||
- customizable Dashboard
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country-specific features:
|
||||
- Spanish Tax RE and IRPF
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Greece fetch customer vat details from AADE, all invoice types, MyData(external free module)
|
||||
- ZATCA e-invoicing QR-Code
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with data privacy rules (Europe's GDPR, ...)
|
||||
- Compatible with European GDPR rules
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
@@ -221,8 +207,7 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
|
||||
|
||||
### Extending
|
||||
|
||||
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
@@ -230,49 +215,38 @@ These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING AND RELEASE PROCESS
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code, ...) [[Contributing](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
Please read the instructions how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A View on Contributors:
|
||||
A view on Contributors:
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
The release process is described into the file dev/build/makepack-howto.md
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries.
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Mastodon](https://pouet.chapril.org/@dolibarr)
|
||||
- [BlueSky](https://bsky.app/profile/dolibarr.org)
|
||||
- [Threads](https://www.threads.net/@dolibarr)
|
||||
- [X](https://x.com/dolibarr)
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
## Sponsors
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
111
SECURITY.md
111
SECURITY.md
@@ -1,35 +1,29 @@
|
||||
# Security Policy
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, a popular Open Source ERP and CRM used by millions of users.
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
|
||||
|
||||
## Supported Versions for security reports
|
||||
|
||||
Security report are valid only on current stable version (see https://dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
|
||||
|
||||
| Version | Supported |
|
||||
| ---------- | ---------------------- |
|
||||
| <= 14.0.4 | :x: |
|
||||
| >= 14.0.5+ | :white_check_mark: except CSRF attacks|
|
||||
| >= develop | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, for a private report, you can:
|
||||
|
||||
- Send your report on Vulnerability Disclosure Program (VDP): Link will be updated soon (recommended for everybody)
|
||||
<!--
|
||||
- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
|
||||
-->
|
||||
- Or send an email to security@dolibarr.org with clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
To report a vulnerability, for a private report, please use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new) (if you have permissions).
|
||||
Alternatively send an email to security@dolibarr.org (for everybody)
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
We believe that the future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
|
||||
We believe that future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
|
||||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly.
|
||||
We plan to re-open our bug bounty program (closed in end of 2024) in the future, but this is not yet available.
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
We recommend to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
We recommand to install Dolibarr ERP CRM on your own server (as most Open Source software, download and use is free: [https://www.dolibarr.org/download](https://www.dolibarr.org/download)) to get access on every side of application.
|
||||
|
||||
### User Agent
|
||||
|
||||
@@ -37,80 +31,67 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
||||
|
||||
### Account access
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr, however only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr however, only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
|
||||
You must be the first reporter of the vulnerability (duplicate reports are closed).
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommend to install software on your own platform.
|
||||
You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install softwate on your own platform.
|
||||
|
||||
You must not leak, manipulate, or destroy any user data of third parties to find your vulnerability.
|
||||
|
||||
Reports are processed around once a month.
|
||||
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
|
||||
* The version to analyze must be the last version available in the "develop" branch. Reports on vulnerabilities already fixed (so already reported) in the develop branch will not be validated.
|
||||
* $dolibarr_main_prod must be set to 1 in conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 in conf.php (this is the default value)
|
||||
* $dolibarr_main_prod must be set to 1 into conf.php
|
||||
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
|
||||
* $dolibarr_main_force_https must be set to something else than 0.
|
||||
* Some constant must be set in the backoffice menu Home - Setup - Other
|
||||
- MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
|
||||
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
|
||||
- MAIN_DISALLOW_URL_INTO_DESCRIPTIONS = 1 (only relative links are allowed in descriptions/notes), or 2 (no links are allowed in descriptions/notes)
|
||||
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
|
||||
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 3 into backoffice menu Home - Setup - Other (this protection should be set to 3 soon by default)
|
||||
* The module DebugBar and ModuleBuilder must NOT be enabled (by default, these modules are not enabled. They are developer tools)
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles into "experimental", "developement" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode and directory listing is not allowed. The directory path htdocs/ must be read-only.
|
||||
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
|
||||
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
|
||||
* The web server setup must be done so only the documents directory is in write mode. The root directory called htdocs must be readonly.
|
||||
* CSRF attacks are accepted but double check that you have set MAIN_SECURITY_CSRF_WITH_TOKEN to value 3.
|
||||
* Ability for a high level user to edit web site pages into the CMS by including HTML or Javascript is an expected feature. Vulnerabilities into the website module are validated only if HTML or Javascript injection can be done by a non allowed user.
|
||||
|
||||
Scope is the web application (backoffice) and the APIs.
|
||||
Scope is the web application (back office) and the APIs.
|
||||
|
||||
|
||||
## Examples of vulnerabilities that are Qualified for reporting.
|
||||
## Qualifying vulnerabilities for reporting
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except
|
||||
in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Code injections (HTML, JS, SQL, PHP, ...)
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose or into module "Web site" when permission to edit website content is allowed).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
* Insecure direct object references (IDOR)
|
||||
* Cross-Origin Resource Sharing (CORS) with real security impact
|
||||
* Insecure direct object references
|
||||
* CORS with real security impact
|
||||
* Horizontal and vertical privilege escalation
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non-admin users only)
|
||||
* Stack traces or path disclosure (for non-admin users only)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only
|
||||
if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
* Software version disclosure (for non admin users only)
|
||||
* Stack traces or path disclosure (for non admin users only)
|
||||
|
||||
## Non-qualifying vulnerabilities for reporting
|
||||
|
||||
## Examples of vulnerabilities that are Non-qualified for reporting.
|
||||
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Directory Listing (this is a bad setup of the web server, not a problem into the application)
|
||||
* "Self" XSS
|
||||
* SSL/TLS best practices
|
||||
* Denial of Service attacks
|
||||
* Clickjacking/UI redressing
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
|
||||
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
|
||||
* SSL/TLS practices (cypher enabled or not)
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Vulnerabilities of type XSS exploited by using javascript into a website page of the website module or by using php code into a website page (being able to set javascript or php code is the expected behaviour in the website module), except if the user does not have the permission to edit page or php code.
|
||||
* Presence of autocomplete attribute on web forms
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Logout and other instances of low-severity Cross-Site Request Forgery
|
||||
* Missing security-related HTTP headers which do not lead directly to a vulnerability
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Reports on features flagged as "experimental" or "development"
|
||||
* Software version or private IP disclosure when logged user is admin
|
||||
* Stack traces or path disclosure when logged user is admin
|
||||
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".
|
||||
|
||||
0
dev/build/.gitignore → build/.gitignore
vendored
0
dev/build/.gitignore → build/.gitignore
vendored
96
build/README
Normal file
96
build/README
Normal file
@@ -0,0 +1,96 @@
|
||||
README (English)
|
||||
|
||||
Path: /dolibarr/build/README
|
||||
|
||||
##################################################
|
||||
Building packages
|
||||
##################################################
|
||||
|
||||
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
|
||||
The build directory and all its contents is absolutely not required to make Dolibarr working.
|
||||
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
There are several tools:
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
See makepack-howto.txt for prerequisites.
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a theme package, launch the script
|
||||
> perl makepack-dolibarrtheme.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
You can find in "build", following sub-directories:
|
||||
|
||||
* composer
|
||||
To test an upgrade of a lib.
|
||||
|
||||
* debian
|
||||
To build Debian package.
|
||||
|
||||
* dmg:
|
||||
To build Mac OS package (not ready yet).
|
||||
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* docker:
|
||||
To deploy Dolibarr with docker.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
* exe:
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* gource:
|
||||
To build the video of history of git changes.
|
||||
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
* pad:
|
||||
To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* patch:
|
||||
Script file to generate a patch file to distribute a Dolibarr mod.
|
||||
|
||||
* perl:
|
||||
Tool to install dolibarr when using virtualmin pro
|
||||
|
||||
* rpm:
|
||||
To build Redhat, Opensuse or Mandriva package.
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* travis-ci:
|
||||
Used by travis to make CI.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
19
build/composer/README
Normal file
19
build/composer/README
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
* To list packages
|
||||
|
||||
composer show -i
|
||||
|
||||
* To test upgrade of a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader --dry-run ccampbell/chromephp
|
||||
|
||||
* To upgrade a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader ccampbell/chromephp
|
||||
|
||||
|
||||
|
||||
@@ -43,16 +43,16 @@ END
|
||||
|
||||
# Complete .bashrc with DEBEMAIL and DEBFULLNAME
|
||||
Example:
|
||||
export DEBFULLNAME="Laurent Destailleur (eldy)"
|
||||
export DEBFULLNAME="Laurent Destailleur (eldy)"
|
||||
export DEBEMAIL=eldy@users.sourceforge.net
|
||||
Other example:
|
||||
export DEBFULLNAME="Laurent Destailleur"
|
||||
export DEBFULLNAME="Laurent Destailleur"
|
||||
export DEBEMAIL="eldy@destailleur.fr"
|
||||
|
||||
export QUILT_PATCHES=debian/patches
|
||||
|
||||
|
||||
# Note: alioth.debian.org is outdated --> https://alioth-archive.debian.org/ --> https://salsa.debian.org/public
|
||||
# Note: alioth.debian.org is outdated --> https://alioth-archive.debian.org/ --> https://salsa.debian.org/public
|
||||
* Create an account login
|
||||
* Update your ~/.ssh/config file to add:
|
||||
Host svn.debian.org git.debian.org bzr.debian.org hg.debian.org darcs.debian.org arch.debian.org
|
||||
@@ -72,19 +72,19 @@ export QUILT_PATCHES=debian/patches
|
||||
# podebconf-report-po --from email@email.com To send email to ask translations
|
||||
# Edit manually file XX.po and remove all lines "#, fuzzy" when translation is complete
|
||||
# msgfmt -v -c -o /dev/null XX.po To have status of translation for language XX
|
||||
|
||||
|
||||
# To check package integrity
|
||||
# lintian --pedantic -E -I package.deb To test a binary package
|
||||
# lintian --pedantic -E -I package.dsc To test a source package
|
||||
# lintian --pedantic -E -I package.deb To test a binary package
|
||||
# lintian --pedantic -E -I package.dsc To test a source package
|
||||
|
||||
# To manipulate packages
|
||||
# dpkg -l List all packages
|
||||
# dpkg -b To build binary only package
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give information on package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg -L packagename List content of installed package
|
||||
# dpkg -L packagename List content of installed package
|
||||
# dpkg -r packagename Remove config files and interactive saved answers
|
||||
# dpkg -s packagename Give status of installed package
|
||||
# dpkg --purge Remove config files and interactive saved answers
|
||||
@@ -104,9 +104,9 @@ See page https://www.debian.org/devel/wnpp/#l1 for example of ITP requests conte
|
||||
- Wait until you received bug number.
|
||||
For first ITP submission of Dolibarr, bug id was 634783.
|
||||
|
||||
- Check bug is into database by searching with id on
|
||||
- Check bug is into database by searching with id on
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634783
|
||||
|
||||
|
||||
- Add a line for upstream into file changelog with bug number
|
||||
|
||||
- Call for a mentor on ML debian-mentors to upload packages
|
||||
@@ -129,26 +129,26 @@ To set status of a bug to "pending"
|
||||
> bts --smtp-host=yoursmtpserver tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
With a message starting with:
|
||||
|
||||
Control: tag -1 +pending
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
To remove status of a bug without "moreinfo" (bug can be processed)
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
With a message starting with:
|
||||
|
||||
Control: tag -1 -moreinfo
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
With only message
|
||||
tag 729538 -moreinfo
|
||||
|
||||
|
||||
@@ -172,8 +172,8 @@ Pour lister les env chroot
|
||||
or
|
||||
> ls /srv/chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot (example schroot -c unstable-amd64-sbuild)
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> apt-get install vim dialog
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
@@ -212,7 +212,7 @@ or better
|
||||
|
||||
* You can then create a PHP project from Eclipse called tcpdf-debian
|
||||
from git clone dir and make link to git.
|
||||
|
||||
|
||||
* If local branch upstream and pristine-tar does not exists, create it
|
||||
from origin/upstream and origin/pristine.
|
||||
|
||||
@@ -220,7 +220,7 @@ from origin/upstream and origin/pristine.
|
||||
> debian/get-orig-source.sh
|
||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||
|
||||
* Some files are removed from archive by the get-orig-source.sh
|
||||
* Some files are removed from archive by the get-orig-source.sh
|
||||
|
||||
* Modify the tag file to replace sRGB.icc with correct free version and rename file into
|
||||
tcpdf_x.y.z+dfsgw.orig.tar.xz
|
||||
@@ -243,14 +243,14 @@ Warning: Date must have format reported by "date -R"
|
||||
Warning: Name and email must match value into debian/control file (Entry added here is used by next step).
|
||||
|
||||
* We try to build package
|
||||
> rm -fr ../build-area;
|
||||
> rm -fr ../build-area;
|
||||
> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-x.y.z]
|
||||
ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
|
||||
@@ -297,7 +297,7 @@ from origin/upstream and origin/pristine.
|
||||
> debian/get-orig-source.sh
|
||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||
|
||||
* Edit orig.tar.gz file to remove
|
||||
* Edit orig.tar.gz file to remove
|
||||
- debian
|
||||
- htdocs/includes/ckeditor
|
||||
- htdocs/includes/jquery/css
|
||||
@@ -311,7 +311,7 @@ If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VER
|
||||
- htdocs/includes/restler/framework/Luracast/Restler/explorer
|
||||
- htdocs/includes/swiftmailer
|
||||
- htdocs/includes/tcpdf or htdocs/includes/tecnickcom
|
||||
And rename file into
|
||||
And rename file into
|
||||
dolibarr-x.y.z+dfsgw.tgz
|
||||
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
||||
|
||||
@@ -343,9 +343,9 @@ To update dolibarr debian package when only files into debian has changed:
|
||||
|
||||
To update dolibarr debian package when only files not into debian has changed:
|
||||
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* You can test patching of series with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* Update the debian/changelog to add entry of change.
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
@@ -357,8 +357,8 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
|
||||
@@ -382,7 +382,7 @@ Note: If there was errors managed manually, you may need to make a git commit bu
|
||||
|
||||
* Package arrives into FTPmaster taskboard with status NEW (pending upload). You can view it at:
|
||||
http://ftp-master.debian.org/new/
|
||||
|
||||
|
||||
* Once package is validated, you should see it into area unstable at:
|
||||
http://packages.qa.debian.org
|
||||
|
||||
@@ -390,7 +390,7 @@ http://packages.qa.debian.org
|
||||
|
||||
|
||||
|
||||
##### Send an unblock request to make a full update of a stable package
|
||||
##### Send an unblock request to make a full update of a stable package
|
||||
|
||||
Use this to move from unstable to testing.
|
||||
|
||||
@@ -402,7 +402,7 @@ Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
A security error CVE-2015-3935 was reported and is fixed into package 3.5.7.
|
||||
Note that package 3.5.7 contains not only fixed for bugs reported to debian. It includes other fixes, but they are all related to stability or security,
|
||||
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
|
||||
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
|
||||
@@ -423,14 +423,14 @@ Pro are:
|
||||
- Patches were already tested because deployed and used by several thousands of users.
|
||||
- It is easier for package maintener to include this official set of fixes than applying one patch after one patch for each debian report or backported each patch into a dedicated version.
|
||||
- Debian maintenance version is inline with official project maintenance version (better when all fixes are not related to the way the software is packaged)
|
||||
Cons are:
|
||||
Cons are:
|
||||
- The patch include more than the only one security reported fixes
|
||||
|
||||
So I just need to know if it's ok to push such a version 3.5.7 (fixes for 3.5.* branch) instead of only one fix for only the few (the only) reported debian bugs,
|
||||
since it provides more stability and is for me a more secured process.
|
||||
"
|
||||
|
||||
##### Send an request to ask a simple fix of a stable package
|
||||
##### Send an request to ask a simple fix of a stable package
|
||||
|
||||
Use this to ask to apply patches on a stable version.
|
||||
|
||||
@@ -442,7 +442,7 @@ Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
A security error CVE-2015-3935 was reported and is fixed into package 3.5.7.
|
||||
Note that package 3.5.7 contains not only fixed for bugs reported to debian. It includes other fixes, but they are all related to stability or security,
|
||||
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
|
||||
so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935.
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
Note: If there is a response to ask more information, don't forget to remove the tag during answer.
|
||||
21
build/debian/apache/.htaccess
Normal file
21
build/debian/apache/.htaccess
Normal file
@@ -0,0 +1,21 @@
|
||||
# File used to disable access into directory documents
|
||||
<IfVersion >= 2.3>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny, allow
|
||||
Denied from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommanded for static resources).
|
||||
# Note that you must also enable the module mod_expires.
|
||||
#ExpiresActive On
|
||||
#ExpiresByType image/x-icon A2592000
|
||||
#ExpiresByType image/gif A2592000
|
||||
#ExpiresByType image/png A2592000
|
||||
#ExpiresByType image/jpeg A2592000
|
||||
#ExpiresByType text/css A2592000
|
||||
#ExpiresByType text/javascript A2592000
|
||||
#ExpiresByType application/x-javascript A2592000
|
||||
#ExpiresByType application/javascript A2592000
|
||||
6
build/debian/changelog
Normal file
6
build/debian/changelog
Normal file
@@ -0,0 +1,6 @@
|
||||
dolibarr (__VERSION__) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 12 May 2015 12:00:00 +0100
|
||||
1
build/debian/compat
Normal file
1
build/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
7
|
||||
@@ -137,7 +137,7 @@ $dolibarr_main_db_collation='latin1_swedish_ci';
|
||||
# Default value: dolibarr
|
||||
# Possible values: Any values found in files in htdocs/core/login directory after
|
||||
# the "function_" string and before the ".php" string. You can also separate several
|
||||
# values using a ",". In this case, Dolibarr will check login/pass for each value in
|
||||
# values using a ",". In this case, Dolibarr will check login/pass for each value in
|
||||
# order defined into value. However, note that this can't work with all values.
|
||||
# Examples:
|
||||
# $dolibarr_main_authentication='http';
|
||||
@@ -235,3 +235,4 @@ $dolibarr_main_prod='0';
|
||||
# dolibarr_main_distrib
|
||||
# A key to identify the distribution used for first installation
|
||||
$dolibarr_main_distrib = 'debian';
|
||||
|
||||
7
dev/build/debian/control → build/debian/control
Normal file → Executable file
7
dev/build/debian/control → build/debian/control
Normal file → Executable file
@@ -7,7 +7,7 @@ Standards-Version: 3.9.6
|
||||
Homepage: https://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
|
||||
|
||||
Package: dolibarr
|
||||
Architecture: all
|
||||
# For debian 7 or 8 or 9
|
||||
@@ -19,6 +19,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
php-pear, php-mail-mime,
|
||||
# php-tcpdf,
|
||||
# libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
# Required javascript libraries
|
||||
@@ -35,8 +36,8 @@ Recommends: apache2 | lighttpd | httpd,
|
||||
php-xml, php-mbstring, php-intl
|
||||
Suggests: www-browser, php5-geoip
|
||||
Description: Web based software to manage a company or foundation
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
companies, foundations or freelances. It includes different
|
||||
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||
companies, foundations or freelances. It includes different
|
||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||
Management (CRM) but also for different other activities.
|
||||
.
|
||||
@@ -38,7 +38,7 @@ Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
2011, Herve Prot <herve.prot@symeos.com>
|
||||
2011, Remy Younes <ryounes@gmail.com>
|
||||
2012-2013, Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
|
||||
License: GPL-3+
|
||||
This program is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public
|
||||
@@ -61,10 +61,35 @@ License: GPL-3+
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/adodbtime/*
|
||||
Copyright: 2003-2005, John Lim
|
||||
unknown, jackbbs
|
||||
License: BSD-3-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
.
|
||||
Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
.
|
||||
Neither the name of the John Lim nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
Comment:
|
||||
Those files are not shipped in the binary package since we use
|
||||
the library as packaged in "libphp-adodb".
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is triple licensed under the GNU General Public License (GPL),
|
||||
The ckeditor is tripple licensed under the GNU General Public License (GPL),
|
||||
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
|
||||
In Debian, it is distributed under the GNU General Public License (GPL).
|
||||
.
|
||||
@@ -147,7 +172,7 @@ Comments:
|
||||
------------------------------------------------------------
|
||||
|
||||
Files: doc/images/*
|
||||
Copyright: Laurent Destailleur
|
||||
Copyright: Laurent Destailleur
|
||||
License: CC-BY-SA-3.0
|
||||
You are free:
|
||||
to Share (to copy, distribute and transmit the work) and
|
||||
@@ -306,7 +331,7 @@ Comment:
|
||||
|
||||
Files: htdocs/includes/odtphp/*
|
||||
Copyright: 2008, Julien Pauli
|
||||
2008, Cyril PIERRE de GEYER
|
||||
2008, Cyril PIERRE de GEYER
|
||||
2010, Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it
|
||||
4
dev/build/debian/dolibarr.config → build/debian/dolibarr.config
Executable file → Normal file
4
dev/build/debian/dolibarr.config → build/debian/dolibarr.config
Executable file → Normal file
@@ -2,8 +2,6 @@
|
||||
# Debian install package run: config, preinst, prerm, postinst, postrm
|
||||
#
|
||||
|
||||
# shellcheck disable=1091,2034
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
@@ -50,7 +48,7 @@ echo "Ask for web server to setup"
|
||||
db_input critical dolibarr/reconfigure-webserver || true
|
||||
|
||||
if db_go ; then
|
||||
okcancel="1"
|
||||
okcancel="1"
|
||||
else
|
||||
okcancel="0"
|
||||
fi
|
||||
27
build/debian/dolibarr.desktop
Normal file
27
build/debian/dolibarr.desktop
Normal file
@@ -0,0 +1,27 @@
|
||||
[Desktop Entry]
|
||||
# This file is used to add Ubuntu menu entry
|
||||
# It must be saved into directory /usr/share/applications
|
||||
Version=1.0
|
||||
Name=Dolibarr ERP & CRM
|
||||
Name[es]=Dolibarr ERP & CRM
|
||||
Name[fr]=Dolibarr ERP & CRM
|
||||
Name[it]=Dolibarr ERP & CRM
|
||||
GenericName=Dolibarr ERP & CRM
|
||||
Comment=The easy to use manager (ERP & CRM) for small and medium enterprises or foundations
|
||||
Comment[es]=Software para gestión de PYMES, profesionales independientes, auto emprendedores ó asociaciones
|
||||
Comment[fr]=L'ERP & CRM simple pour la gestion des PME et associations
|
||||
Comment[it]=Programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti
|
||||
# Command to open an URL
|
||||
# For Fedora: xdg-open
|
||||
# For Debian/Ubuntu: xdg-open or x-www-browser
|
||||
# (exo-open for xfde, gnome-open for gnome, ...)
|
||||
Exec=xdg-open http://localhost/dolibarr
|
||||
Icon=dolibarr
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Office
|
||||
StartupNotify=true
|
||||
InitialPreference=5
|
||||
Keywords=erp,crm,billing,customer,supplier,stock,agenda,project,order,shipment
|
||||
#NoDisplay=true
|
||||
#OnlyShowIn=GNOME
|
||||
@@ -8,4 +8,4 @@ htdocs usr/share/dolibarr/
|
||||
scripts usr/share/dolibarr/
|
||||
doc/install usr/share/doc/dolibarr/
|
||||
doc/user usr/share/doc/dolibarr/
|
||||
doc/index.html usr/share/doc/dolibarr/
|
||||
doc/index.html usr/share/doc/dolibarr/
|
||||
@@ -7,4 +7,4 @@ dolibarr: apache2-deprecated-auth-config Order
|
||||
dolibarr: apache2-deprecated-auth-config Allow
|
||||
# Ignore warning required for a good install process
|
||||
dolibarr: apache2-reverse-dependency-calls-wrapper-script postinst a2enmod
|
||||
dolibarr: apache2-reverse-dependency-calls-wrapper-script postinst a2enconf
|
||||
dolibarr: apache2-reverse-dependency-calls-wrapper-script postinst a2enconf
|
||||
99
dev/build/debian/dolibarr.postinst → build/debian/dolibarr.postinst
Executable file → Normal file
99
dev/build/debian/dolibarr.postinst → build/debian/dolibarr.postinst
Executable file → Normal file
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
# postinst script for dolibarr
|
||||
|
||||
# shellcheck disable=1091,2086,2154
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
@@ -21,25 +19,25 @@ if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
|
||||
fi
|
||||
|
||||
setup_empty_conf() {
|
||||
echo Create empty file $config
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
echo Create empty file $config
|
||||
mkdir -p /etc/dolibarr
|
||||
touch /etc/dolibarr/conf.php
|
||||
chown root:www-data /etc/dolibarr/conf.php
|
||||
chmod 660 /etc/dolibarr/conf.php
|
||||
}
|
||||
|
||||
is_new_upstream_version() {
|
||||
# $1 can be empty (not installed) and will result in a true value
|
||||
# for the check
|
||||
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
|
||||
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
test "$old_version" != "$new_version"
|
||||
# $1 can be empty (not installed) and will result in a true value
|
||||
# for the check
|
||||
old_version=$(echo "$1" | sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
new_version=$(dpkg-query -f '${Version}' -W dolibarr | \
|
||||
sed -e 's/-[^-]*$//' -e 's/^[0-9]*://')
|
||||
test "$old_version" != "$new_version"
|
||||
}
|
||||
|
||||
enable_install_upgrade_wizard() {
|
||||
echo Enable install wizard by removing install.lock file if present
|
||||
rm -f /var/lib/dolibarr/documents/install.lock
|
||||
rm -f /var/lib/dolibarr/documents/install.lock
|
||||
}
|
||||
|
||||
|
||||
@@ -48,24 +46,24 @@ php_install() {
|
||||
# php5endmod exists for ubuntu only
|
||||
echo "Enable php module mysqli with php5enmod"
|
||||
php5enmod mysqli
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
apache_install() {
|
||||
webserver=$1
|
||||
|
||||
|
||||
# Enable Apache 2 alias module
|
||||
if which a2enmod >/dev/null 2>&1 ;then
|
||||
echo "Enable apache module alias with a2enmod"
|
||||
a2enmod alias
|
||||
fi
|
||||
|
||||
|
||||
# Enable dolibarr conf
|
||||
if which a2enconf >/dev/null 2>&1 ;then
|
||||
# a2enconf exists for ubuntu only
|
||||
echo "Enable link for Apache config file with a2enconf"
|
||||
a2enconf dolibarr
|
||||
else
|
||||
else
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
echo "Add link for Apache config file"
|
||||
ln -s /etc/$webserver/conf-available/dolibarr.conf /etc/$webserver/conf.d/dolibarr.conf
|
||||
@@ -103,7 +101,7 @@ case "$1" in
|
||||
configure)
|
||||
if [ -z "$2" ]; then
|
||||
echo First install
|
||||
#setup_empty_conf
|
||||
#setup_empty_conf
|
||||
else
|
||||
echo This is not a first install
|
||||
fi
|
||||
@@ -111,17 +109,17 @@ case "$1" in
|
||||
php_install
|
||||
apache_install
|
||||
lighttpd_install
|
||||
|
||||
|
||||
# Remove lock file
|
||||
if is_new_upstream_version "$2"; then
|
||||
enable_install_upgrade_wizard
|
||||
enable_install_upgrade_wizard
|
||||
fi
|
||||
|
||||
# Create document directory for uploaded data files
|
||||
mkdir -p $docdir
|
||||
chown -R www-data:www-data $docdir
|
||||
chmod -R 775 $docdir
|
||||
chmod -R g+s $docdir
|
||||
|
||||
# Create document directory for uploaded data files
|
||||
mkdir -p $docdir
|
||||
chown -R www-data:www-data $docdir
|
||||
chmod -R 775 $docdir
|
||||
chmod -R g+s $docdir
|
||||
|
||||
# Copy install config file (with matching Debian values) into target directory
|
||||
superuserlogin=''
|
||||
@@ -138,16 +136,17 @@ case "$1" in
|
||||
cat $installfileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $installconfig
|
||||
fi
|
||||
chown -R root:www-data $installconfig
|
||||
chmod -R 660 $installconfig
|
||||
chmod -R 660 $installconfig
|
||||
|
||||
# If a conf already exists and its content was already completed by installer
|
||||
if [ ! -s $config ] || ! grep -q "File generated by" $config
|
||||
then
|
||||
# Create an empty conf.php with permission to web server
|
||||
setup_empty_conf
|
||||
#else
|
||||
#else
|
||||
# File already exist. We add params not found.
|
||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||
##grep -q -c "dolibarr_lib_GEOIP_PATH" $config || echo "<?php \$dolibarr_lib_GEOIP_PATH=''; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_NUSOAP_PATH" $config || [ ! -d "/usr/share/php/nusoap" ] || echo "<?php \$dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_lib_ODTPHP_PATHTOPCLZIP" $config || [ ! -d "/usr/share/php/libphp-pclzip" ] || echo "<?php \$dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip'; ?>" >> $config
|
||||
@@ -156,18 +155,18 @@ case "$1" in
|
||||
#grep -q -c "dolibarr_js_JQUERY" $config || [ ! -d "/usr/share/javascript/jquery" ] || echo "<?php \$dolibarr_js_JQUERY='/javascript/jquery'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY_UI" $config || [ ! -d "/usr/share/javascript/jquery-ui" ] || echo "<?php \$dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_js_JQUERY_FLOT" $config || [ ! -d "/usr/share/javascript/flot" ] || echo "<?php \$dolibarr_js_JQUERY_FLOT='/javascript/flot'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
#grep -q -c "dolibarr_font_DOL_DEFAULT_TTF_BOLD" $config || echo "<?php \$dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; ?>" >> $config
|
||||
fi
|
||||
|
||||
|
||||
db_get dolibarr/reconfigure-webserver
|
||||
|
||||
|
||||
webservers="$RET"
|
||||
|
||||
|
||||
# Set up web server.
|
||||
for webserver in $webservers ; do
|
||||
webserver=${webserver%,}
|
||||
echo Complete config of server $webserver
|
||||
|
||||
|
||||
# Detect webuser and webgroup
|
||||
webuser=
|
||||
webgroup=
|
||||
@@ -183,7 +182,7 @@ case "$1" in
|
||||
|
||||
# Set permissions to web server
|
||||
chown -R $webuser:$webgroup /usr/share/dolibarr
|
||||
chown -R root:$webgroup $config
|
||||
chown -R root:$webgroup $config
|
||||
done
|
||||
|
||||
# Restart web server.
|
||||
@@ -195,33 +194,33 @@ case "$1" in
|
||||
apache_install $webserver
|
||||
fi
|
||||
# Reload webserver in any case, configuration might have changed
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
echo Restart web server $server using invoke-rc.d
|
||||
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
else
|
||||
echo Restart web server $server using $server reload
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
echo Restart web server $server using invoke-rc.d
|
||||
# This works with Debian (5.05,...) and Ubuntu (9.10,10.04,...)
|
||||
invoke-rc.d $webserver reload 3>/dev/null || true
|
||||
else
|
||||
echo Restart web server $server using $server reload
|
||||
/etc/init.d/$webserver reload 3>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
echo ----------
|
||||
echo "Call Dolibarr page http://localhost/dolibarr/ to complete the setup and use Dolibarr."
|
||||
echo ----------
|
||||
;;
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument $1" >&2
|
||||
exit 0
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
104
dev/build/debian/dolibarr.postrm → build/debian/dolibarr.postrm
Executable file → Normal file
104
dev/build/debian/dolibarr.postrm → build/debian/dolibarr.postrm
Executable file → Normal file
@@ -3,8 +3,6 @@
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
# shellcheck disable=1091,2006,2034,2086,2089,2090
|
||||
|
||||
#set -e
|
||||
set +e
|
||||
|
||||
@@ -32,8 +30,8 @@ lighttpd_remove() {
|
||||
fi
|
||||
# See bug #448682
|
||||
if [ -h /etc/lighttpd/conf-enabled/50-dolibarr.conf ] ; then
|
||||
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
|
||||
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
|
||||
echo "postrm Manually deleting lighttpd/dolibarr configuration link"
|
||||
rm /etc/lighttpd/conf-enabled/50-dolibarr.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -48,7 +46,7 @@ apache_remove() {
|
||||
|
||||
|
||||
if [ -f /usr/share/debconf/confmodule ]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
db_version 2.0
|
||||
@@ -64,12 +62,12 @@ lockfile="$docdir/install.lock"
|
||||
|
||||
case "$1" in
|
||||
|
||||
# Call when we upgrade
|
||||
# Call when we upgrade
|
||||
upgrade)
|
||||
echo "postrm upgrade"
|
||||
;;
|
||||
;;
|
||||
|
||||
# Call when we uninstall
|
||||
# Call when we uninstall
|
||||
remove)
|
||||
echo "postrm remove"
|
||||
rm -f $lockfile
|
||||
@@ -87,7 +85,7 @@ case "$1" in
|
||||
else
|
||||
apache_remove $webserver
|
||||
fi
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# Redirection of 3 is needed because Debconf uses it and it might
|
||||
# be inherited by webserver. See bug #446324.
|
||||
if [ -f /etc/init.d/$webserver ] ; then
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
@@ -97,9 +95,9 @@ case "$1" in
|
||||
fi
|
||||
fi
|
||||
done
|
||||
;;
|
||||
;;
|
||||
|
||||
# Call when we uninstall and purge
|
||||
# Call when we uninstall and purge
|
||||
purge)
|
||||
echo "postrm purge"
|
||||
|
||||
@@ -113,7 +111,7 @@ case "$1" in
|
||||
set +e
|
||||
db_get dolibarr/postrm
|
||||
set -e
|
||||
|
||||
|
||||
if [ "$RET" = "true" ] ; then
|
||||
echo postrm Mysql database deletion
|
||||
# Get database configuration
|
||||
@@ -133,7 +131,7 @@ case "$1" in
|
||||
dbadmin="$superuserlogin"
|
||||
dbadmpass="$superuserpassword"
|
||||
dbtype="mysql"
|
||||
|
||||
|
||||
# To delete a mysql user (disabled)
|
||||
# Needs: $dbuser - the user name to create (or replace).
|
||||
# $dballow - what hosts to allow (defaults to %).
|
||||
@@ -146,7 +144,7 @@ case "$1" in
|
||||
# mysql
|
||||
# /usr/share/wwwconfig-coomon/mysql.get
|
||||
#. /usr/share/wwwconfig-common/${dbtype}-dropuser.sh
|
||||
|
||||
|
||||
# To delete database
|
||||
# Needs: $dbname - the database that user should have access to.
|
||||
# $dbserver - the server to connect to.
|
||||
@@ -160,85 +158,85 @@ case "$1" in
|
||||
# Define mysqlcmd
|
||||
if [ -z "$dbserver" ] || [ "$dbserver" = "localhost" ]; then
|
||||
hostopt=""
|
||||
dbserver=localhost
|
||||
dbserver=localhost
|
||||
else
|
||||
case "$dbserver" in
|
||||
:*)
|
||||
dbsocket=`echo $dbserver | sed -e 's/^://'`
|
||||
hostopt="-S $dbsocket"
|
||||
;;
|
||||
*)
|
||||
hostopt="-h $dbserver"
|
||||
;;
|
||||
esac
|
||||
case "$dbserver" in
|
||||
:*)
|
||||
dbsocket=`echo $dbserver | sed -e 's/^://'`
|
||||
hostopt="-S $dbsocket"
|
||||
;;
|
||||
*)
|
||||
hostopt="-h $dbserver"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ -z "$dbadmpass" ] ; then
|
||||
log="${log}No password used."
|
||||
passopt=""
|
||||
log="${log}No password used."
|
||||
passopt=""
|
||||
else
|
||||
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
|
||||
passopt="--password='"`echo "$dbadmpass" | sed -e "s/'/'"'"'"'"'"'"'/g"`"'"
|
||||
fi
|
||||
mysqlcmd="mysql $hostopt $passopt -u $dbadmin"
|
||||
mysqlcmdnopass="mysql $hostopt -u $dbadmin"
|
||||
|
||||
# Now run the drop user
|
||||
|
||||
# Now run the drop user
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'localhost';\"" ; then
|
||||
echo postrm Database login $dbuser@localhost removed
|
||||
else
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'localhost';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
if eval $mysqlcmd -f -e "\"DROP USER '$dbuser'@'%';\"" ; then
|
||||
echo postrm Database login $dbuser@% removed
|
||||
else
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
error="Unable to run $mysqlcmdnopass -f -e \"DROP USER '$dbuser'@'%';\""
|
||||
echo postrm $error
|
||||
fi
|
||||
|
||||
# Now run the drop commands
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
log="${log}Dropping database $dbname."
|
||||
# Now run the drop commands
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
log="${log}Droping database $dbname."
|
||||
if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
error="Database $dbname NOT successfully dropped. You have to do it manually."
|
||||
echo postrm $error
|
||||
else
|
||||
status=drop
|
||||
fi
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
error="Database $dbname NOT successfully droped. You have to do it manually."
|
||||
echo postrm $error
|
||||
else
|
||||
status=drop
|
||||
fi
|
||||
else
|
||||
error="Unable to run the drop database script."
|
||||
error="Unable to run the drop database script."
|
||||
echo postrm $error
|
||||
fi
|
||||
else
|
||||
else
|
||||
status=nothing
|
||||
log="${log}Database $dbname already not exists."
|
||||
fi
|
||||
|
||||
echo "postrm Remove directory $docdir"
|
||||
rm -rf $docdir ;
|
||||
fi
|
||||
|
||||
echo "postrm Remove directory $docdir"
|
||||
rm -rf $docdir ;
|
||||
|
||||
else
|
||||
echo "postrm Delete of dolibarr database and uploaded files not wanted"
|
||||
echo "postrm Delete of dolibarr database and uploaded files not wanted"
|
||||
fi
|
||||
|
||||
|
||||
rm -rf /etc/dolibarr
|
||||
|
||||
# We clean variable (we ignore errors because db_reset can fails if var was never set)
|
||||
set +e
|
||||
set +e
|
||||
db_reset dolibarr/reconfigure-webserver
|
||||
db_reset dolibarr/postrm
|
||||
set -e
|
||||
set -e
|
||||
|
||||
#db_purge
|
||||
;;
|
||||
;;
|
||||
|
||||
failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument $1" >&2
|
||||
exit 0
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
@@ -102,3 +102,4 @@ Description: Delete database ?
|
||||
# Delete also all uploaded and generated files (datas related
|
||||
# to this quetion are all files found into /usr/share/dolibarr/documents,
|
||||
# uploaded or generated when using Dolibarr) ?
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck disable=2034,2086,2103,2164
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
|
||||
# Download source file
|
||||
if [ -n "$1" ]; then
|
||||
uscan_opts="--download-version=$1"
|
||||
uscan_opts="--download-version=$1"
|
||||
fi
|
||||
#uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||
|
||||
42
build/debian/install.forced.php.install
Normal file
42
build/debian/install.forced.php.install
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// File to force Dolibarr wizard installer choices.
|
||||
//
|
||||
// This file must be present into htdocs/install or /etc/dolibarr directory
|
||||
// during install process to be used.
|
||||
//
|
||||
//
|
||||
|
||||
$force_install_packager='deb';
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
#$force_install_main_data_root='/usr/share/dolibarr/documents';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='3306';
|
||||
$force_install_database='dolibarrdebian';
|
||||
$force_install_createdatabase='1';
|
||||
$force_install_databaselogin='dolibarrdebian';
|
||||
$force_install_databasepass='';
|
||||
$force_install_createuser='1';
|
||||
$force_install_databaserootlogin='__SUPERUSERLOGIN__';
|
||||
$force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='debian';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
|
||||
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are
|
||||
// - not removed from package (see rm in rules file),
|
||||
// - declared into dependencies (see Depends in control file)
|
||||
//$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
//$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
@@ -1,11 +1,11 @@
|
||||
# Alias for dolibarr directory
|
||||
alias.url += (
|
||||
alias.url += (
|
||||
"/dolibarr" => "/usr/share/dolibarr/htdocs",
|
||||
)
|
||||
|
||||
# Disallow access to libraries
|
||||
#$HTTP["url"] =~ "^/dolibarr/libraries" {
|
||||
# url.access-deny = ( "" )
|
||||
#$HTTP["url"] =~ "^/dolibarr/libraries" {
|
||||
# url.access-deny = ( "" )
|
||||
#}
|
||||
|
||||
# Limit access to setup script
|
||||
@@ -19,8 +19,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
|
||||
|
||||
// Include configuration
|
||||
--- a/htdocs/install/inc.php
|
||||
+++ b/htdocs/install/inc.php
|
||||
@@ -32,6 +32,6 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
-//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
+$conffile = "/etc/dolibarr/conf.php";
|
||||
+$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
$short_options = "c:h";
|
||||
$long_options = array(
|
||||
|
||||
|
||||
// Load conf file if it is already defined
|
||||
1
build/debian/po/POTFILES.in
Normal file
1
build/debian/po/POTFILES.in
Normal file
@@ -0,0 +1 @@
|
||||
[type: gettext/rfc822deb] dolibarr.templates
|
||||
@@ -4,7 +4,7 @@
|
||||
export DH_VERBOSE=1
|
||||
export DH_OPTIONS=-v
|
||||
|
||||
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file
|
||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||
|
||||
|
||||
%:
|
||||
@@ -19,10 +19,6 @@ override_dh_auto_clean:
|
||||
override_dh_auto_build:
|
||||
# Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant
|
||||
|
||||
# Force the compression format for control files
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
#override_dh_compress:
|
||||
# dh_compress --no-act -X.png
|
||||
|
||||
@@ -66,7 +62,7 @@ override_dh_install:
|
||||
rm -fr dev/xdebug
|
||||
rm -f dev/dolibarr_changes.txt
|
||||
rm -f dev/README
|
||||
|
||||
|
||||
rm -f doc/images/dolibarr_screenshot2.png
|
||||
rm -f doc/images/dolibarr_screenshot3.png
|
||||
rm -f doc/images/dolibarr_screenshot4.png
|
||||
@@ -81,18 +77,19 @@ override_dh_install:
|
||||
|
||||
rm -fr test
|
||||
|
||||
rm -fr dev/build/aps
|
||||
rm -fr dev/build/dmg
|
||||
rm -fr dev/build/doap
|
||||
rm -fr dev/build/exe
|
||||
rm -fr dev/build/launchpad
|
||||
rm -fr dev/build/live
|
||||
rm -fr dev/build/patch
|
||||
rm -fr dev/build/perl
|
||||
rm -fr dev/build/rpm
|
||||
rm -fr dev/build/zip
|
||||
|
||||
rm -fr build/aps
|
||||
rm -fr build/dmg
|
||||
rm -fr build/doap
|
||||
rm -fr build/exe
|
||||
rm -fr build/launchpad
|
||||
rm -fr build/live
|
||||
rm -fr build/patch
|
||||
rm -fr build/perl
|
||||
rm -fr build/rpm
|
||||
rm -fr build/zip
|
||||
|
||||
# clean from all PHP embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/adodbtime
|
||||
# rm -fr htdocs/includes/geoip
|
||||
# rm -fr htdocs/includes/nusoap
|
||||
# rm -fr htdocs/includes/odtphp/zip/pclzip
|
||||
@@ -128,3 +125,4 @@ override_dh_fixperms:
|
||||
# Give rights to the webserver on the upload directory
|
||||
chown www-data:www-data debian/dolibarr/var/lib/dolibarr/documents
|
||||
chmod 2775 debian/dolibarr/var/lib/dolibarr/documents
|
||||
|
||||
1
build/debian/source/format
Normal file
1
build/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
2
build/debian/source/include-binaries
Normal file
2
build/debian/source/include-binaries
Normal file
@@ -0,0 +1,2 @@
|
||||
htdocs/install/doctemplates/websites/website_template-corporate.zip
|
||||
htdocs/install/doctemplates/websites/website_template-stellar.zip
|
||||
@@ -14,3 +14,4 @@ source-is-missing htdocs/includes/restler/framework/Luracast/Restler/explorer/li
|
||||
# Those are false positives, the files are their own sources since
|
||||
# they are data files
|
||||
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
||||
|
||||
7
build/dmg/dolimamp/README
Normal file
7
build/dmg/dolimamp/README
Normal file
@@ -0,0 +1,7 @@
|
||||
README (English)
|
||||
##################################################
|
||||
DOLIMAMP Package tools
|
||||
##################################################
|
||||
|
||||
This directory contains files and docs used to build
|
||||
a DoliMamp package for Mac OS X.
|
||||
16
build/dmg/dolimamp/install.forced.php
Normal file
16
build/dmg/dolimamp/install.forced.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$force_install_message='KeepDefaultValuesMamp';
|
||||
$force_install_main_data_root='/Applications/MAMP/dolibarr_documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='8889';
|
||||
$force_install_database='dolibarr';
|
||||
$force_install_createdatabase='1';
|
||||
$force_install_databaselogin='dolibarrmysql';
|
||||
$force_install_databasepass='root';
|
||||
$force_install_createuser='1';
|
||||
$force_install_databaserootlogin='root';
|
||||
$force_install_databaserootpass='root';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
61
build/docker/Dockerfile
Normal file
61
build/docker/Dockerfile
Normal file
@@ -0,0 +1,61 @@
|
||||
FROM php:7.3-apache
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 25" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
34
build/docker/README.md
Normal file
34
build/docker/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
|
||||
This docker image intended for developpement usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
60
build/docker/docker-compose.yml
Normal file
60
build/docker/docker-compose.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:80"
|
||||
- "25:25"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
22
build/docker/docker-run.sh
Normal file
22
build/docker/docker-run.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
usermod -u ${HOST_USER_ID} www-data
|
||||
groupmod -g ${HOST_USER_ID} www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
if [ ! -f /usr/local/etc/php/php.ini ]; then
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
date.timezone = $PHP_INI_DATE_TIMEZONE
|
||||
EOF
|
||||
fi
|
||||
|
||||
exec apache2-foreground
|
||||
3
build/docker/mariadb/Dockerfile
Normal file
3
build/docker/mariadb/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# Start the generation of the development documentation with doxygen
|
||||
# Lance la generation de la doc dev doxygen
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Determine the patho of this script
|
||||
# Detecte repertoire du script
|
||||
($DIR=$0) =~ s/([^\/\\]+)$//;
|
||||
$DIR||='.';
|
||||
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
@@ -17,9 +17,9 @@ use Cwd;
|
||||
my $dir = getcwd;
|
||||
|
||||
print "Current dir is: $dir\n";
|
||||
#print "Running dir for doxygen must be: $DIR\n";
|
||||
print "Running dir for doxygen must be: $DIR\n";
|
||||
|
||||
if (! -s "dev/build/doxygen/$CONFFILE")
|
||||
if (! -s $CONFFILE)
|
||||
{
|
||||
print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n";
|
||||
print "\n";
|
||||
@@ -27,10 +27,10 @@ if (! -s "dev/build/doxygen/$CONFFILE")
|
||||
print '> perl .\dolibarr-doxygen-build.pl (on Windows)'."\n";
|
||||
print '> perl ../dolibarr-doxygen-build.pl (on Linux or BSD)'."\n";
|
||||
sleep 4;
|
||||
exit 1;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
$SOURCE=".";
|
||||
$SOURCE="../..";
|
||||
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
|
||||
@@ -47,8 +47,8 @@ $version=$MAJOR.".".$MINOR.".".$BUILD;
|
||||
|
||||
|
||||
print "Running doxygen for version ".$version.", please wait...\n";
|
||||
print "cat dev/build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/".$version."/' | doxygen $OPTIONS - 2>&1\n";
|
||||
$result=`cat dev/build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/$version/' | doxygen $OPTIONS - 2>&1`;
|
||||
print "cat $CONFFILE | sed -e 's/x\.y\.z/".$version."/' | doxygen $OPTIONS - 2>&1\n";
|
||||
$result=`cat $CONFFILE | sed -e 's/x\.y\.z/$version/' | doxygen $OPTIONS - 2>&1`;
|
||||
|
||||
print $result;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot
|
||||
|
||||
$file=$ARGV[0];
|
||||
if (! $file)
|
||||
if (! $file)
|
||||
{
|
||||
print "Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot\n";
|
||||
exit;
|
||||
@@ -1,17 +1,14 @@
|
||||
# Doxyfile 1.8.16
|
||||
# Doxyfile 1.7.3
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
# doxygen (www.doxygen.org) for a project
|
||||
#
|
||||
# All text after a double hash (##) is considered a comment and is placed in
|
||||
# front of the TAG it is preceding.
|
||||
#
|
||||
# All text after a single hash (#) is considered a comment and will be ignored.
|
||||
# All text after a hash (#) is considered a comment and will be ignored
|
||||
# The format is:
|
||||
# TAG = value [value, ...]
|
||||
# For lists, items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (\" \").
|
||||
# TAG = value [value, ...]
|
||||
# For lists items can also be appended using:
|
||||
# TAG += value [value, ...]
|
||||
# Values that contain spaces should be placed between quotes (" ")
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
@@ -41,7 +38,7 @@ PROJECT_NUMBER = x.y.z
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = dev/build
|
||||
OUTPUT_DIRECTORY = ../../build
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
@@ -89,7 +86,7 @@ REPEAT_BRIEF = YES
|
||||
# "The $name file" "is" "provides" "specifies" "contains"
|
||||
# "represents" "a" "an" "the"
|
||||
|
||||
ABBREVIATE_BRIEF =
|
||||
ABBREVIATE_BRIEF =
|
||||
|
||||
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
|
||||
# Doxygen will generate a detailed section even if there is only a brief
|
||||
@@ -117,7 +114,7 @@ FULL_PATH_NAMES = YES
|
||||
# If left blank the directory from which doxygen is run is used as the
|
||||
# path to strip.
|
||||
|
||||
STRIP_FROM_PATH = "/home/dolibarr/doxygen.dolibarr.org/"
|
||||
STRIP_FROM_PATH = "../.."
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
|
||||
# the path mentioned in the documentation of a class, which tells
|
||||
@@ -126,7 +123,7 @@ STRIP_FROM_PATH = "/home/dolibarr/doxygen.dolibarr.org/"
|
||||
# definition is used. Otherwise one should specify the include paths that
|
||||
# are normally passed to the compiler using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
|
||||
# (but less readable) file names. This can be useful is your file systems
|
||||
@@ -182,7 +179,7 @@ TAB_SIZE = 2
|
||||
# will result in a user-defined paragraph with heading "Side Effects:".
|
||||
# You can put \n's in the value part of an alias to insert newlines.
|
||||
|
||||
ALIASES =
|
||||
ALIASES =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
|
||||
# sources only. Doxygen will then generate output that is more tailored for C.
|
||||
@@ -220,8 +217,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
|
||||
# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
|
||||
|
||||
#EXTENSION_MAPPING = example=PHP
|
||||
EXTENSION_MAPPING =
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
|
||||
# to include (a tag file for) the STL sources as input, then you should
|
||||
@@ -283,15 +279,15 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
||||
#SYMBOL_CACHE_SIZE = 0
|
||||
SYMBOL_CACHE_SIZE = 0
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
@@ -452,7 +448,7 @@ GENERATE_TODOLIST = NO
|
||||
# disable (NO) the test list. This list is created by putting \test
|
||||
# commands in the documentation.
|
||||
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_TESTLIST = YES
|
||||
|
||||
# The GENERATE_BUGLIST tag can be used to enable (YES) or
|
||||
# disable (NO) the bug list. This list is created by putting \bug
|
||||
@@ -469,7 +465,7 @@ GENERATE_DEPRECATEDLIST = YES
|
||||
# The ENABLED_SECTIONS tag can be used to enable conditional
|
||||
# documentation sections, marked by \if sectionname ... \endif.
|
||||
|
||||
ENABLED_SECTIONS =
|
||||
ENABLED_SECTIONS =
|
||||
|
||||
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
|
||||
# the initial value of a variable or define consists of for it to appear in
|
||||
@@ -491,7 +487,7 @@ SHOW_USED_FILES = YES
|
||||
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
|
||||
# in the documentation. The default is NO.
|
||||
|
||||
#SHOW_DIRECTORIES = YES
|
||||
SHOW_DIRECTORIES = YES
|
||||
|
||||
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
|
||||
# This will remove the Files entry from the Quick Index and from the
|
||||
@@ -515,7 +511,7 @@ SHOW_NAMESPACES = NO
|
||||
# is used as the file version. See the manual for examples.
|
||||
|
||||
#FILE_VERSION_FILTER = dolibarr-doxygen-getversion.pl
|
||||
FILE_VERSION_FILTER =
|
||||
FILE_VERSION_FILTER =
|
||||
|
||||
# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
|
||||
# by doxygen. The layout file controls the global structure of the generated
|
||||
@@ -524,7 +520,7 @@ FILE_VERSION_FILTER =
|
||||
# You can optionally specify a file name after the option, if omitted
|
||||
# DoxygenLayout.xml will be used as the name of the layout file.
|
||||
|
||||
LAYOUT_FILE =
|
||||
LAYOUT_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
@@ -575,7 +571,7 @@ WARN_FORMAT = "$file:$line: $text"
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE = dev/build/html/doxygen_warnings.log
|
||||
WARN_LOGFILE = doxygen_warnings.log
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
@@ -586,7 +582,7 @@ WARN_LOGFILE = dev/build/html/doxygen_warnings.log
|
||||
# directories like "/usr/src/myproject". Separate the files or directories
|
||||
# with spaces.
|
||||
|
||||
INPUT = htdocs scripts
|
||||
INPUT = ../../htdocs ../../scripts
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||
@@ -603,7 +599,6 @@ INPUT_ENCODING = UTF-8
|
||||
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
|
||||
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
|
||||
|
||||
#FILE_PATTERNS = *.php *.pl *.sql *.example
|
||||
FILE_PATTERNS = *.php *.pl
|
||||
|
||||
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
|
||||
@@ -616,7 +611,7 @@ RECURSIVE = YES
|
||||
# excluded from the INPUT source files. This way you can easily exclude a
|
||||
# subdirectory from a directory tree whose root is specified with the INPUT tag.
|
||||
|
||||
EXCLUDE = build dev doc document documents htdocs/conf/conf.php htdocs/custom htdocs/document htdocs/documents htdocs/includes htdocs/install/doctemplates
|
||||
EXCLUDE = ../../build ../../dev ../../doc ../../document ../../documents ../../htdocs/conf/conf.php ../../htdocs/custom ../../htdocs/document ../../htdocs/documents ../../htdocs/includes
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
|
||||
# directories that are symbolic links (a Unix filesystem feature) are excluded
|
||||
@@ -630,7 +625,7 @@ EXCLUDE_SYMLINKS = YES
|
||||
# against the file with absolute path, so to exclude all test directories
|
||||
# for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = */CVS/*
|
||||
EXCLUDE_PATTERNS = */CVS/* *google* *pibarcode*
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -638,33 +633,33 @@ EXCLUDE_PATTERNS = */CVS/*
|
||||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain example code fragments that are included (see
|
||||
# the \include command).
|
||||
|
||||
#EXAMPLE_PATH = htdocs/modulebuilder/template
|
||||
EXAMPLE_PATH = ../../htdocs/modulebuilder/template
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
# and *.h) to filter out the source-files in the directories. If left
|
||||
# blank all files are included.
|
||||
|
||||
#EXAMPLE_PATTERNS = *.php
|
||||
EXAMPLE_PATTERNS = *.php
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude
|
||||
# commands irrespective of the value of the RECURSIVE tag.
|
||||
# Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
#EXAMPLE_RECURSIVE = NO
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or
|
||||
# directories that contain image that are included in the documentation (see
|
||||
# the \image command).
|
||||
|
||||
IMAGE_PATH = doc/images
|
||||
IMAGE_PATH = ../../doc/images
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
@@ -678,7 +673,7 @@ IMAGE_PATH = doc/images
|
||||
# Works on Linux only
|
||||
#INPUT_FILTER = ../dolibarr-doxygen-filter.pl
|
||||
#INPUT_FILTER = "perl ../dolibarr-doxygen-filter.pl"
|
||||
INPUT_FILTER =
|
||||
INPUT_FILTER =
|
||||
|
||||
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
|
||||
# basis.
|
||||
@@ -689,7 +684,7 @@ INPUT_FILTER =
|
||||
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
|
||||
# is applied to all files.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
FILTER_PATTERNS =
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will be used to filter the input files when producing source
|
||||
@@ -767,29 +762,27 @@ ALPHABETICAL_INDEX = YES
|
||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||
# in which this list will be split (can be a number in the range [1..20])
|
||||
|
||||
#COLS_IN_ALPHA_INDEX = 5
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all
|
||||
# classes will be put under the same header in the alphabetical index.
|
||||
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
|
||||
# should be ignored while generating the index headers.
|
||||
|
||||
IGNORE_PREFIX =
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
|
||||
# The default value is: YES.
|
||||
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
|
||||
# generate HTML output.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
# it.
|
||||
# The default directory is: html.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
|
||||
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
|
||||
# put in front of it. If left blank `html' will be used as the default path.
|
||||
|
||||
HTML_OUTPUT = html
|
||||
|
||||
@@ -804,14 +797,14 @@ HTML_FILE_EXTENSION = .html
|
||||
# standard header.
|
||||
|
||||
# Does not work with 1.7.3
|
||||
#HTML_HEADER = dev/build/doxygen/doxygen_header.html
|
||||
#HTML_HEADER = doxygen_header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
# Does not work with 1.7.3
|
||||
HTML_FOOTER = dev/build/doxygen/doxygen_footer.html
|
||||
HTML_FOOTER = doxygen_footer.html
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
@@ -820,7 +813,7 @@ HTML_FOOTER = dev/build/doxygen/doxygen_footer.html
|
||||
# the style sheet file to the HTML output directory, so don't put your own
|
||||
# stylesheet in the HTML output directory as well, or it will be erased!
|
||||
|
||||
HTML_STYLESHEET =
|
||||
HTML_STYLESHEET =
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
|
||||
# Doxygen will adjust the colors in the stylesheet and background images
|
||||
@@ -857,18 +850,7 @@ HTML_TIMESTAMP = YES
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
# NO a bullet list will be used.
|
||||
|
||||
#HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_DYNAMIC_MENUS = NO
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
|
||||
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
|
||||
# documentation will contain sections that can be hidden and shown after the
|
||||
@@ -876,7 +858,7 @@ HTML_DYNAMIC_MENUS = NO
|
||||
# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
|
||||
# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
|
||||
|
||||
HTML_DYNAMIC_SECTIONS = NO
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
||||
# will be generated that can be used as input for Apple's Xcode 3
|
||||
@@ -927,14 +909,14 @@ GENERATE_HTMLHELP = NO
|
||||
# can add a path in front of the file if the result should not be
|
||||
# written to the html output directory.
|
||||
|
||||
CHM_FILE =
|
||||
CHM_FILE =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
|
||||
# be used to specify the location (absolute path including file name) of
|
||||
# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
|
||||
# the HTML help compiler on the generated index.hhp.
|
||||
|
||||
HHC_LOCATION =
|
||||
HHC_LOCATION =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
|
||||
# controls if a separate .chi index file is generated (YES) or that
|
||||
@@ -946,7 +928,7 @@ GENERATE_CHI = NO
|
||||
# is used to encode HtmlHelp index (hhk), content (hhc) and project file
|
||||
# content.
|
||||
|
||||
CHM_INDEX_ENCODING =
|
||||
CHM_INDEX_ENCODING =
|
||||
|
||||
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
|
||||
# controls whether a binary table of contents is generated (YES) or a
|
||||
@@ -970,7 +952,7 @@ GENERATE_QHP = NO
|
||||
# be used to specify the file name of the resulting .qch file.
|
||||
# The path specified is relative to the HTML output folder.
|
||||
|
||||
QCH_FILE =
|
||||
QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating
|
||||
# Qt Help Project output. For more information please see
|
||||
@@ -988,14 +970,14 @@ QHP_VIRTUAL_FOLDER = doc
|
||||
# add. For more information please see
|
||||
# http://doc.trolltech.com/qthelpproject.html#custom-filters
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see
|
||||
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
|
||||
# Qt Help Project / Custom Filters</a>.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's
|
||||
@@ -1003,14 +985,14 @@ QHP_CUST_FILTER_ATTRS =
|
||||
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
|
||||
# Qt Help Project / Filter Attributes</a>.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
|
||||
# be used to specify the location of Qt's qhelpgenerator.
|
||||
# If non-empty doxygen will try to run qhelpgenerator on the generated
|
||||
# .qhp file.
|
||||
|
||||
QHG_LOCATION =
|
||||
QHG_LOCATION =
|
||||
|
||||
# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
|
||||
# will be generated, which together with the HTML files, form an Eclipse help
|
||||
@@ -1021,7 +1003,7 @@ QHG_LOCATION =
|
||||
# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
|
||||
# the help appears.
|
||||
|
||||
GENERATE_ECLIPSEHELP = NO
|
||||
GENERATE_ECLIPSEHELP = YES
|
||||
|
||||
# A unique identifier for the eclipse help plugin. When installing the plugin
|
||||
# the directory name containing the HTML and XML files should also have
|
||||
@@ -1053,7 +1035,7 @@ GENERATE_TREEVIEW = NO
|
||||
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
|
||||
# and Class Hierarchy pages using a tree view instead of an ordered list.
|
||||
|
||||
#USE_INLINE_TREES = NO
|
||||
USE_INLINE_TREES = NO
|
||||
|
||||
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
|
||||
# used to set the initial width (in pixels) of the frame in which the tree
|
||||
@@ -1090,7 +1072,7 @@ FORMULA_TRANSPARENT = YES
|
||||
# typically be disabled. For large projects the javascript based search engine
|
||||
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
|
||||
|
||||
SEARCHENGINE = YES
|
||||
SEARCHENGINE = NO
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a PHP enabled web server instead of at the web client
|
||||
@@ -1100,7 +1082,7 @@ SEARCHENGINE = YES
|
||||
# full text search. The disadvances is that it is more difficult to setup
|
||||
# and does not have live searching capabilities.
|
||||
|
||||
SERVER_BASED_SEARCH = YES
|
||||
SERVER_BASED_SEARCH = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
@@ -1146,14 +1128,14 @@ PAPER_TYPE = a4
|
||||
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
|
||||
# packages that should be included in the LaTeX output.
|
||||
|
||||
EXTRA_PACKAGES =
|
||||
EXTRA_PACKAGES =
|
||||
|
||||
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
|
||||
# the generated latex document. The header should contain everything until
|
||||
# the first chapter. If it is left blank doxygen will generate a
|
||||
# standard header. Notice: only use this tag if you know what you are doing!
|
||||
|
||||
LATEX_HEADER =
|
||||
LATEX_HEADER =
|
||||
|
||||
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
|
||||
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
|
||||
@@ -1223,12 +1205,12 @@ RTF_HYPERLINKS = NO
|
||||
# config file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an rtf document.
|
||||
# Syntax is similar to doxygen's config file.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
@@ -1278,13 +1260,13 @@ XML_OUTPUT = xml
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
#XML_SCHEMA =
|
||||
XML_SCHEMA =
|
||||
|
||||
# The XML_DTD tag can be used to specify an XML DTD,
|
||||
# which can be used by a validating XML parser to check the
|
||||
# syntax of the XML files.
|
||||
|
||||
#XML_DTD =
|
||||
XML_DTD =
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
|
||||
# dump the program listings (including syntax highlighting
|
||||
@@ -1338,7 +1320,7 @@ PERLMOD_PRETTY = YES
|
||||
# This is useful so different doxyrules.make files included by the same
|
||||
# Makefile don't overwrite each other's variables.
|
||||
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
@@ -1372,14 +1354,14 @@ SEARCH_INCLUDES = YES
|
||||
# contain include files that are not input files but should be processed by
|
||||
# the preprocessor.
|
||||
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_PATH =
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
# directories. If left blank, the patterns specified with FILE_PATTERNS will
|
||||
# be used.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that
|
||||
# are defined before the preprocessor is started (similar to the -D option of
|
||||
@@ -1389,14 +1371,14 @@ INCLUDE_FILE_PATTERNS =
|
||||
# undefined via #undef or recursively expanded use the := operator
|
||||
# instead of the = operator.
|
||||
|
||||
PREDEFINED =
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
# The macro definition that is found in the sources will be used.
|
||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||
|
||||
EXPAND_AS_DEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
|
||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||
@@ -1427,12 +1409,12 @@ SKIP_FUNCTION_MACROS = YES
|
||||
# If a tag file is not located in the directory in which doxygen
|
||||
# is run, you must also specify the path to the tagfile here.
|
||||
|
||||
TAGFILES =
|
||||
TAGFILES =
|
||||
|
||||
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
|
||||
# a tag file that is based on the input files it reads.
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
|
||||
# in the class index. If set to NO only the inherited external classes
|
||||
@@ -1449,7 +1431,7 @@ EXTERNAL_GROUPS = YES
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of `which perl').
|
||||
|
||||
#PERL_PATH = /usr/bin/perl
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
@@ -1471,7 +1453,7 @@ CLASS_DIAGRAMS = NO
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
#MSCGEN_PATH =
|
||||
MSCGEN_PATH =
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide
|
||||
# inheritance and usage relations if the target is undocumented
|
||||
@@ -1503,7 +1485,7 @@ DOT_NUM_THREADS = 0
|
||||
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
|
||||
# containing the font.
|
||||
|
||||
#DOT_FONTNAME = FreeSans.ttf
|
||||
DOT_FONTNAME = FreeSans.ttf
|
||||
|
||||
# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
|
||||
# The default size is 10pt.
|
||||
@@ -1515,7 +1497,7 @@ DOT_FONTSIZE = 10
|
||||
# different font using DOT_FONTNAME you can set the path where dot
|
||||
# can find it using this tag.
|
||||
|
||||
DOT_FONTPATH =
|
||||
DOT_FONTPATH =
|
||||
|
||||
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
|
||||
# will generate a graph for each documented class showing the direct and
|
||||
@@ -1598,13 +1580,13 @@ DOT_IMAGE_FORMAT = png
|
||||
# The tag DOT_PATH can be used to specify the path where the dot tool can be
|
||||
# found. If left blank, it is assumed the dot tool can be found in the path.
|
||||
|
||||
DOT_PATH =
|
||||
DOT_PATH =
|
||||
|
||||
# The DOTFILE_DIRS tag can be used to specify one or more directories that
|
||||
# contain dot files that are included in the documentation (see the
|
||||
# \dotfile command).
|
||||
|
||||
DOTFILE_DIRS =
|
||||
DOTFILE_DIRS =
|
||||
|
||||
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
|
||||
# nodes that will be shown in the graph. If the number of nodes in a graph
|
||||
@@ -1652,7 +1634,3 @@ GENERATE_LEGEND = YES
|
||||
# the various graphs.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
|
||||
FULL_SIDEBAR = NO
|
||||
HTML_EXTRA_STYLESHEET = dev/build/doxygen/doxygen-awesome.css
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
File added into doxygen generated documentation
|
||||
-->
|
||||
|
||||
@@ -23,4 +23,4 @@ File added into doxygen generated documentation
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -48,3 +48,5 @@
|
||||
</div>
|
||||
|
||||
<!-- End doxygen_header.html -->
|
||||
|
||||
|
||||
@@ -43,5 +43,5 @@ DoliWampWillStartApacheMysql=L'instal·lador DoliWamp intentarà iniciar o reini
|
||||
OldVersionFoundAndMoveInNew=S'ha trobat una versió antiga de base de dades i ha estat moguda per a ser utilitzada per la nova versió de Dolibarr
|
||||
OldVersionFoundButFailedToMoveInNew=S'ha trobat una versió antiga de base de dades, però no es pot moure per a ser utilitzada per la nova versió de Dolibarr
|
||||
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2017". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
DLLMissing=La teva instal·lació windows no té el component "Microsoft Visual C++ Redistributable for Visual Studio 2012". Instal·la primer la versió de 32-bit (vcredist_x86.exe) (pots trobar-la a https://www.microsoft.com/en-us/download/) i reiniciar després la instal·lació/actualització de DoliWamp.
|
||||
ContinueAnyway=Continua igualment (el procés d'instal·lació podria fallar sense aquest prerequisit)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user