215 lines
5.6 KiB
Markdown
215 lines
5.6 KiB
Markdown
# Odex25 Standard Modules
|
|
|
|
This repository contains general standard modules for all projects.
|
|
|
|
## Cloning and Pulling Branches
|
|
### You have to Options to configure you git client
|
|
1. Using SSH keys :
|
|
See this link --> https://www.youtube.com/watch?v=EoLrCX1VVog
|
|
3. Using token
|
|
|
|
```sh
|
|
GH_TOKEN=<your_token>
|
|
```
|
|
```
|
|
echo "echo $GH_TOKEN" > ~/git-askpass.sh
|
|
chmod +x ~/git-askpass.sh
|
|
export GIT_ASKPASS=~/git-askpass.sh
|
|
git config --global core.askPass ~/git-askpass.sh
|
|
git config --global user.name 'github-username'
|
|
git config --global user.email 'github-username@exp-sa.com'
|
|
```
|
|
|
|
### Clone the Repository
|
|
Clone the master branch, use the following command:
|
|
```sh
|
|
git clone -b master --depth=1 https://github.com/expsa/odex25-standard-modules.git STANDARD_MODULES
|
|
|
|
cd STANDARD_MODULES
|
|
|
|
chmod +x clone.sh pull.sh
|
|
```
|
|
|
|
# Clone Branches
|
|
To clone or pull branches, use the provided scripts:
|
|
```sh
|
|
./clone.sh
|
|
```
|
|
|
|
This is a Bash script designed to clone multiple branches from a single Git repository into environment-specific directories (test, preprod, master). It intelligently handles existing folders and Git states to ensure clean and organized cloning.
|
|
|
|
### 📁 Output Folder Structure
|
|
After execution, the script will produce a structure like:
|
|
|
|
```bash
|
|
.
|
|
├── test/
|
|
│ ├── odex25_accounting/
|
|
│ ├── odex25_base/
|
|
│ └── ...
|
|
├── preprod/
|
|
│ ├── odex25_accounting/
|
|
│ └── ...
|
|
├── master/
|
|
│ ├── odex25_accounting/
|
|
│ └── ...
|
|
```
|
|
|
|
### 🛠️ How to Use
|
|
```bash
|
|
./clone.sh [environment]
|
|
```
|
|
|
|
#### ✅ Without Arguments
|
|
Runs a full clone of all defined branches (dev, preprod, master):
|
|
|
|
```bash
|
|
./clone.sh
|
|
```
|
|
|
|
#### ✅ With Environment Filter
|
|
You can limit cloning to a specific environment:
|
|
|
|
Clone only dev branches (go into test/ folder):
|
|
```bash
|
|
./clone.sh test
|
|
```
|
|
Clone only preprod branches:
|
|
```bash
|
|
./clone.sh preprod
|
|
```
|
|
Clone only master branches:
|
|
```bash
|
|
./clone.sh master
|
|
```
|
|
|
|
# Pull Branches:
|
|
- For Test Branches:
|
|
```sh
|
|
./pull.sh test
|
|
```
|
|
- For Preprod Branches:
|
|
```sh
|
|
./pull.sh preprod
|
|
```
|
|
- For Master Branches:
|
|
```sh
|
|
./pull.sh master
|
|
```
|
|
|
|
## Branches
|
|
### Development Branches
|
|
- `dev_odex-event`
|
|
- `dev_odex25_accounting`
|
|
- `dev_odex25_base`
|
|
- `dev_odex25_dms`
|
|
- `dev_odex25_fleet`
|
|
- `dev_odex25_helpdesk`
|
|
- `dev_odex25_hr`
|
|
- `dev_odex25_inventory`
|
|
- `dev_odex25_maintenance`
|
|
- `dev_odex25_mobile`
|
|
- `dev_odex25_pos`
|
|
- `dev_odex25_project`
|
|
- `dev_odex25_purchase`
|
|
- `dev_odex25_realstate`
|
|
- `dev_odex25_sales`
|
|
- `dev_odex25_survey`
|
|
- `dev_odex25_transactions`
|
|
- `dev_odex25_website`
|
|
- `dev_openeducat_erp-14.0.1.0`
|
|
- `dev_odex25_ensan`
|
|
- `dev_odex25_donation`
|
|
### Preproduction Branches
|
|
- `preprod_odex-event`
|
|
- `preprod_odex25_accounting`
|
|
- `preprod_odex25_base`
|
|
- `preprod_odex25_dms`
|
|
- `preprod_odex25_fleet`
|
|
- `preprod_odex25_helpdesk`
|
|
- `preprod_odex25_hr`
|
|
- `preprod_odex25_inventory`
|
|
- `preprod_odex25_maintenance`
|
|
- `preprod_odex25_mobile`
|
|
- `preprod_odex25_pos`
|
|
- `preprod_odex25_project`
|
|
- `preprod_odex25_purchase`
|
|
- `preprod_odex25_realstate`
|
|
- `preprod_odex25_sales`
|
|
- `preprod_odex25_survey`
|
|
- `preprod_odex25_transactions`
|
|
- `preprod_odex25_website`
|
|
- `preprod_openeducat_erp-14.0.1.0`
|
|
- `preprod_odex25_ensan`
|
|
- `preprod_odex25_donation`
|
|
### Master Branches
|
|
- `master_odex-event`
|
|
- `master_odex25_accounting`
|
|
- `master_odex25_base`
|
|
- `master_odex25_dms`
|
|
- `master_odex25_fleet`
|
|
- `master_odex25_helpdesk`
|
|
- `master_odex25_hr`
|
|
- `master_odex25_inventory`
|
|
- `master_odex25_maintenance`
|
|
- `master_odex25_mobile`
|
|
- `master_odex25_pos`
|
|
- `master_odex25_project`
|
|
- `master_odex25_purchase`
|
|
- `master_odex25_realstate`
|
|
- `master_odex25_sales`
|
|
- `master_odex25_survey`
|
|
- `master_odex25_transactions`
|
|
- `master_odex25_website`
|
|
- `master_openeducat_erp-14.0.1.0`
|
|
- `master_odex25_ensan`
|
|
- `master_odex25_donation`
|
|
|
|
## Addons Path
|
|
|
|
```ini
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_base/odex25_base,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_dms/odex25_dms,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_fleet/odex25_fleet,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_helpdesk/odex25_helpdesk,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_hr/odex25_hr,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_inventory/odex25_inventory,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_maintenance/odex25_maintenance,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_mobile/odex25_mobile,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_pos/odex25_pos,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_project/odex25_project,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_purchase/odex25_purchase,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_realstate/odex25_realstate,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_sales/odex25_sales,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/openeducat_erp-14.0.1.0/openeducat_erp-14.0.1.0,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_accounting/odex25_accounting,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_website/odex25_website,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex-event/odex-event,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_transactions/odex25_transactions,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_survey/odex25_survey,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_ensan/odex25_ensan,
|
|
|
|
path_to_dir/STANDARD_MODULES/FOLDER(test,preprod or master)/odex25_donation/odex25_donation
|
|
|
|
|
|
```
|