From 25289054ac3424eb3bb901d1a6692262707a23a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Thu, 19 Jun 2025 08:10:11 +0300 Subject: [PATCH] Update README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f1ed9a076..3d6138db6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# odex25-standard-modules +# Odex25 Standard Modules This repository contains general standard modules for all projects. @@ -10,6 +10,8 @@ This repository contains general standard modules for all projects. ```sh GH_TOKEN= +``` +``` echo "echo $GH_TOKEN" > ~/git-askpass.sh chmod +x ~/git-askpass.sh export GIT_ASKPASS=~/git-askpass.sh @@ -22,16 +24,66 @@ git config --global user.email 'github-username@exp-sa.com' 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 or Pull Branches +# Clone Branches To clone or pull branches, use the provided scripts: 1. Clone Branches: Replace YOUR_USERNAME and YOUR_TOKEN with your GitHub username and token. ```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 +``` + 2. Pull Branches: - For Test Branches: ```sh