forked from duhon/magento-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clone_repos
executable file
·98 lines (86 loc) · 4.07 KB
/
clone_repos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env bash
source ./.env
export $(cut -d= -f1 ./.env)
DOCKER_PROJECT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [[ "yes" == "$RECLONE" ]]; then
#prepare data
rm -rf $MAGENTO_PATH
mkdir -p $MAGENTO_PATH
cd $MAGENTO_PATH
#chown -R $USER:wheel .
chmod g+s .
git clone --depth 1 git@github.com:${GIT_REPO_CE}/$MAGENTO_CE_DIR.git -b ${GIT_BRANCH_CE}
if [[ "EE" == "$MAGENTO_EDITION" ]] || [[ "B2B" == "$MAGENTO_EDITION" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_EE}/$MAGENTO_EE_DIR.git -b ${GIT_BRANCH_EE}
cd $MAGENTO_EE_DIR
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR --ee-source ../$MAGENTO_EE_DIR
cd ..
fi
if [[ "B2B" == "$MAGENTO_EDITION" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_B2B}/magento2b2b.git -b ${GIT_BRANCH_B2B}
cp magento2ee/dev/tools/build-ee.php magento2b2b/dev/tools/build-ee.php
cd magento2b2b
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR --ee-source ../magento2b2b
cd ..
fi
if [[ "yes" == "$MSI_INSTALL" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_MSI}/inventory.git -b ${GIT_BRANCH_MSI}
mkdir -p inventory/dev/tools
cp magento2ee/dev/tools/build-ee.php inventory/dev/tools/build-ee.php
cd inventory
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR/app/code/Magento --ee-source ../inventory
cd ..
fi
if [[ "yes" == "$STOREFRONT_INSTALL" ]]; then
git clone git@github.com:${GIT_REPO_CATALOG_SF}/catalog-storefront.git
cd catalog-storefront
git checkout -b ${GIT_BRANCH_CATALOG_SF} origin/${GIT_BRANCH_CATALOG_SF}
cd ..
mkdir -p catalog-storefront/dev/tools
cp magento2ee/dev/tools/build-ee.php catalog-storefront/dev/tools/build-ee.php
cd catalog-storefront
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR --ee-source ../catalog-storefront
cd ..
git clone git@github.com:${GIT_REPO_CATALOG_SF_EE}/catalog-storefront-ee.git
cd catalog-storefront-ee
git checkout -b ${GIT_BRANCH_CATALOG_SF_EE} origin/${GIT_BRANCH_CATALOG_SF_EE}
cd ..
mkdir -p catalog-storefront-ee/dev/tools
cp magento2ee/dev/tools/build-ee.php catalog-storefront-ee/dev/tools/build-ee.php
cd catalog-storefront-ee
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR --ee-source ../catalog-storefront-ee
cd ..
if [[ "yes" == "${SAAS_EXPORT}" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_SAAS_EXPORT}/saas-export.git -b ${GIT_BRANCH_SAAS_EXPORT}
mkdir -p saas-export/dev/tools
cp magento2ee/dev/tools/build-ee.php saas-export/dev/tools/build-ee.php
cd saas-export
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR --ee-source ../saas-export
cd ..
fi
if [[ "yes" == "${DSSI}" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_DSSI}/data-solutions-services-id.git -b ${GIT_BRANCH_DSSI}
mkdir -p data-solutions-services-id/dev/tools
cp magento2ee/dev/tools/build-ee.php data-solutions-services-id/dev/tools/build-ee.php
cd data-solutions-services-id
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR/app/code/Magento --ee-source ../data-solutions-services-id
cd ..
fi
if [[ "yes" == "${MSC}" ]]; then
git clone --depth 1 git@github.com:${GIT_REPO_MSC}/magento-services-connector.git -b ${GIT_BRANCH_MSC}
mkdir -p magento-services-connector/dev/tools
cp magento2ee/dev/tools/build-ee.php magento-services-connector/dev/tools/build-ee.php
cd magento-services-connector
mkdir -p ../$MAGENTO_CE_DIR/app/code/Magento/ServicesConnector
php dev/tools/build-ee.php --ce-source ../$MAGENTO_CE_DIR/app/code/Magento/ServicesConnector --ee-source ../magento-services-connector
cd ..
fi
fi
else
cd $MAGENTO_PATH/$MAGENTO_CE_DIR
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 && git checkout -- .
fi
if [[ 'yes' == "$SYM_LINCS" ]]; then
cd $MAGENTO_PATH/$MAGENTO_CE_DIR
git apply $DOCKER_PROJECT_DIR/etc/php/path-validator.patch
fi