-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcreate-public-edition.sh
150 lines (129 loc) · 9.2 KB
/
create-public-edition.sh
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/bin/sh
echo "Starting creation of public edition"
echo "[x] Removing old files"
rm -Rf ../public-edition/src/AbTesting/*
rm -Rf ../public-edition/src/Athena/*
rm -Rf ../public-edition/src/Common/*
rm -Rf ../public-edition/src/Billing/*
rm -Rf ../public-edition/src/Funnel/*
rm -Rf ../public-edition/src/Export/*
rm -Rf ../public-edition/src/Health/*
rm -Rf ../public-edition/src/Invoice/*
rm -Rf ../public-edition/src/Notification/*
rm -Rf ../public-edition/src/Payments/*
rm -Rf ../public-edition/src/Subscriptions/*
rm -Rf ../public-edition/src/User/*
rm -Rf ../public-edition/src/MultiTenancy/*
rm -Rf ../public-edition/spec/Parthenon/*
rm -Rf ../public-edition/src/DependencyInjection/*
rm -Rf ../public-edition/src/Resources/config/doctrine-mapping/*
rm -Rf ../public-edition/src/Resources/views/*
rm -Rf ../public-edition/src/Resources/config/services/*
rm -Rf ../public-edition/tests/*
mkdir ../public-edition/src/Resources/config/services/orm/
mkdir ../public-edition/src/Resources/config/services/odm/
mkdir ../public-edition/src/Resources/config/services/common/
mkdir -p ../public-edition/tests/Parthenon
cp -R src/Parthenon/DependencyInjection ../public-edition/src
cp src/Parthenon/ParthenonBundle.php ../public-edition/src/ParthenonBundle.php
echo "[x] Update Core"
cp -R src/Parthenon/Resources/translations ../public-edition/src/Resources/translations
cp LICENSE ../public-edition/
echo "[x] Update AB Testing"
cp -R src/Parthenon/AbTesting ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/AbTesting.php ../public-edition/src/DependencyInjection/Modules/AbTesting.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/AbTesting ../public-edition/src/Resources/config/doctrine-mapping/
cp -R src/Parthenon/Resources/config/services/ab_testing.xml ../public-edition/src/Resources/config/services/ab_testing.xml
cp -R src/Parthenon/Resources/views/abtesting ../public-edition/src/Resources/views/
cp -R tests/Parthenon/AbTesting ../public-edition/tests/Parthenon/
echo "[x] Update Athena"
cp -R src/Parthenon/Athena ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Athena.php ../public-edition/src/DependencyInjection/Modules/Athena.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/Athena ../public-edition/src/Resources/config/doctrine-mapping/
cp -R src/Parthenon/Resources/config/services/athena.xml ../public-edition/src/Resources/config/services/athena.xml
cp -R src/Parthenon/Resources/views/athena ../public-edition/src/Resources/views/
cp -R tests/Parthenon/Athena ../public-edition/tests/Parthenon/
echo "[x] Update Billing"
cp -R src/Parthenon/Billing ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Billing.php ../public-edition/src/DependencyInjection/Modules/Billing.php
cp -R src/Parthenon/Resources/config/services/billing.xml ../public-edition/src/Resources/config/services/billing.xml
cp -R src/Parthenon/Resources/config/services/billing ../public-edition/src/Resources/config/services/billing
cp -R src/Parthenon/Resources/config/services/orm/billing.xml ../public-edition/src/Resources/config/services/orm/billing.xml
cp -R src/Parthenon/Resources/config/doctrine-mapping/Billing ../public-edition/src/Resources/config/doctrine-mapping/
cp -R tests/Parthenon/Billing ../public-edition/tests/Parthenon/
echo "[x] Update Common"
cp -R src/Parthenon/Common ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Common.php ../public-edition/src/DependencyInjection/Modules/Common.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/Common ../public-edition/src/Resources/config/doctrine-mapping/
cp -R src/Parthenon/Resources/config/services/common/pdf ../public-edition/src/Resources/config/services/common/pdf
cp -R src/Parthenon/Resources/config/services/common.xml ../public-edition/src/Resources/config/services/common.xml
cp -R src/Parthenon/Resources/config/services/monolog_v2.xml ../public-edition/src/Resources/config/services/monolog_v2.xml
cp -R tests/Parthenon/Common ../public-edition/tests/Parthenon/
echo "[x] Update Cloud"
cp -R src/Parthenon/Cloud ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Cloud.php ../public-edition/src/DependencyInjection/Modules/Cloud.php
cp -R src/Parthenon/Resources/config/services/cloud.xml ../public-edition/src/Resources/config/services/cloud.xml
echo "[x] Update Export"
cp -R src/Parthenon/Export ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Export.php ../public-edition/src/DependencyInjection/Modules/Export.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/Export ../public-edition/src/Resources/config/doctrine-mapping/Export
cp -R src/Parthenon/Resources/config/services/orm/export.xml ../public-edition/src/Resources/config/services/orm/export.xml
cp -R src/Parthenon/Resources/config/services/odm/export.xml ../public-edition/src/Resources/config/services/odm/export.xml
cp -R src/Parthenon/Resources/config/services/export.xml ../public-edition/src/Resources/config/services/export.xml
cp -R tests/Parthenon/Export ../public-edition/tests/Parthenon/
echo "[x] Update Funnel"
cp -R src/Parthenon/Funnel ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Funnel.php ../public-edition/src/DependencyInjection/Modules/Funnel.php
cp -R src/Parthenon/Resources/config/services/funnel.xml ../public-edition/src/Resources/config/services/funnel.xml
cp -R tests/Parthenon/Funnel ../public-edition/tests/Parthenon/
echo "[x] Update Health"
cp -R src/Parthenon/Health ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Health.php ../public-edition/src/DependencyInjection/Modules/Health.php
cp -R src/Parthenon/Resources/config/services/orm/health.xml ../public-edition/src/Resources/config/services/orm/health.xml
cp -R src/Parthenon/Resources/config/services/health.xml ../public-edition/src/Resources/config/services/health.xml
cp -R tests/Parthenon/Health ../public-edition/tests/Parthenon/
echo "[x] Update Invoice"
cp -R src/Parthenon/Invoice ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Invoice.php ../public-edition/src/DependencyInjection/Modules/Invoice.php
cp -R src/Parthenon/Resources/config/services/invoice.xml ../public-edition/src/Resources/config/services/invoice.xml
cp -R tests/Parthenon/Invoice ../public-edition/tests/Parthenon/
echo "[x] Update MultiTenancy"
cp -R src/Parthenon/MultiTenancy ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/MultiTenancy.php ../public-edition/src/DependencyInjection/Modules/MultiTenancy.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/MultiTenancy ../public-edition/src/Resources/config/doctrine-mapping/MultiTenancy
cp -R src/Parthenon/Resources/config/services/orm/multi_tenancy.xml ../public-edition/src/Resources/config/services/orm/multi_tenancy.xml
cp -R src/Parthenon/Resources/config/services/odm/multi_tenancy.xml ../public-edition/src/Resources/config/services/odm/multi_tenancy.xml
cp -R src/Parthenon/Resources/config/services/multi_tenancy.xml ../public-edition/src/Resources/config/services/multi_tenancy.xml
cp -R tests/Parthenon/MultiTenancy ../public-edition/tests/Parthenon/
echo "[x] Update Notification"
cp -R src/Parthenon/Notification ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Notification.php ../public-edition/src/DependencyInjection/Modules/Notification.php
cp -R src/Parthenon/Resources/config/services/notification.xml ../public-edition/src/Resources/config/services/notification.xml
cp -R tests/Parthenon/Notification ../public-edition/tests/Parthenon/
echo "[x] Update Payments"
cp -R src/Parthenon/Payments ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/Payments.php ../public-edition/src/DependencyInjection/Modules/Payments.php
cp -R src/Parthenon/Resources/config/services/payments.xml ../public-edition/src/Resources/config/services/payments.xml
cp -R src/Parthenon/Resources/config/services/payments ../public-edition/src/Resources/config/services/
cp -R src/Parthenon/Resources/config/doctrine-mapping/Payments ../public-edition/src/Resources/config/doctrine-mapping/
cp -R tests/Parthenon/Payments ../public-edition/tests/Parthenon/
echo "[x] Update User"
cp -R src/Parthenon/User ../public-edition/src/
cp src/Parthenon/DependencyInjection/Modules/User.php ../public-edition/src/DependencyInjection/Modules/User.php
cp -R src/Parthenon/Resources/config/doctrine-mapping/User ../public-edition/src/Resources/config/doctrine-mapping/
cp -R src/Parthenon/Resources/config/services/orm/user.xml ../public-edition/src/Resources/config/services/orm/user.xml
cp -R src/Parthenon/Resources/config/services/odm/user.xml ../public-edition/src/Resources/config/services/odm/user.xml
cp -R src/Parthenon/Resources/config/services/user.xml ../public-edition/src/Resources/config/services/user.xml
cp -R src/Parthenon/Resources/config/services/user_monolog_v2.xml ../public-edition/src/Resources/config/services/user_monolog_v2.xml
cp -R src/Parthenon/Resources/views/user ../public-edition/src/Resources/views/
cp -R tests/Parthenon/User ../public-edition/tests/Parthenon/
cd ../public-edition
git add -A
if [ -z "$(git status --porcelain)" ]; then
echo "No changes found"
else
echo "Pushing update to repository"
git commit -am "$COMMIT_MESSAGE
Automatic commit for https://github.com/getparthenon/monorepo/commit/$GITHUB_SHA"
git push origin $BRANCH
fi