-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcreate-export-bundle.sh
53 lines (44 loc) · 2.61 KB
/
create-export-bundle.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
#!/bin/sh
echo "Starting creation of export bundle"
echo "[x] Removing old files"
rm -Rf ../export-bundle/src/Common/*
rm -Rf ../export-bundle/src/Export/*
rm -Rf ../export-bundle/src/Notification/*
rm -Rf ../export-bundle/src/DependencyInjection/*
rm -Rf ../export-bundle/src/Resources/config/services/*
mkdir -p ../export-bundle/src/Resources/config/services/orm/
mkdir -p ../export-bundle/src/Resources/config/services/odm/
mkdir -p ../export-bundle/src/Resources/config/services/
mkdir -p ../export-bundle/tests/Parthenon
mkdir -p ../export-bundle/src/DependencyInjection/Modules
echo "[x] Update Common"
cp -R src/Parthenon/Common ../export-bundle/src/
cp -R src/Parthenon/Resources/config/doctrine-mapping/Common ../export-bundle/src/Resources/config/doctrine-mapping/
cp -R src/Parthenon/Resources/config/services/common/pdf ../export-bundle/src/Resources/config/services/common/pdf
cp -R src/Parthenon/Resources/config/services/common.xml ../export-bundle/src/Resources/config/services/common.xml
cp -R src/Parthenon/DependencyInjection/Modules/Common.php ../export-bundle/src/DependencyInjection/Modules/Common.php
cp -R tests/Parthenon/Common ../export-bundle/tests/Parthenon/
echo "[x] Update Export"
cp -R src/Parthenon/Export ../export-bundle/src/
cp -R src/Parthenon/Resources/config/doctrine-mapping/Export ../export-bundle/src/Resources/config/doctrine-mapping/Export
cp -R src/Parthenon/Resources/config/services/orm/export.xml ../export-bundle/src/Resources/config/services/orm/export.xml
cp -R src/Parthenon/Resources/config/services/odm/export.xml ../export-bundle/src/Resources/config/services/odm/export.xml
cp -R src/Parthenon/Resources/config/services/export.xml ../export-bundle/src/Resources/config/services/export.xml
cp -R src/Parthenon/DependencyInjection/Modules/Export.php ../export-bundle/src/DependencyInjection/Modules/Export.php
cp -R tests/Parthenon/Export ../export-bundle/tests/Parthenon/
echo "[x] Update Notification"
cp -R src/Parthenon/Notification ../export-bundle/src/
cp -R src/Parthenon/DependencyInjection/Modules/Notification.php ../export-bundle/src/DependencyInjection/Modules/Notification.php
cp -R src/Parthenon/Resources/config/services/notification.xml ../export-bundle/src/Resources/config/services/notification.xml
cp -R tests/Parthenon/Notification ../export-bundle/tests/Parthenon/
cd ../export-bundle
vendor/bin/php-cs-fixer fix .
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