@@ -44,36 +44,6 @@ check_process()
4444check_command " git"
4545check_command " yarn"
4646
47- VENDOR_DIR=" src/bundle/Resources/public/vendors"
48- BOOTSTRAP_DIR=" $VENDOR_DIR /bootstrap"
49- BOOTSTRAP_NOTICE=" $BOOTSTRAP_DIR /BOOTSTRAP_IN_ADMINUIASSETS.txt"
50- FLATPICKR_DIR=" $VENDOR_DIR /flatpickr"
51- FLATPICKR_NOTICE=" $FLATPICKR_DIR /FLATPICKR_IN_ADMINUIASSETS.txt"
52- JQUERY_DIR=" $VENDOR_DIR /jquery"
53- JQUERY_NOTICE=" $JQUERY_DIR /JQUERY_IN_ADMINUIASSETS.txt"
54- LEAFLET_DIR=" $VENDOR_DIR /leaflet"
55- LEAFLET_NOTICE=" $LEAFLET_DIR /LEAFLET_IN_ADMINUIASSETS.txt"
56- POPPER_DIR=" $VENDOR_DIR /@popperjs"
57- POPPER_NOTICE=" $POPPER_DIR /POPPER_IN_ADMINUIASSETS.txt"
58- REACT_DIR=" $VENDOR_DIR /react"
59- REACT_NOTICE=" $REACT_DIR /REACT_IN_ADMINUIASSETS.txt"
60- REACT_DOM_DIR=" $VENDOR_DIR /react-dom"
61- REACT_DOM_NOTICE=" $REACT_DOM_DIR /REACT_DOM_IN_ADMINUIASSETS.txt"
62- MOMENT_DIR=" $VENDOR_DIR /moment"
63- MOMENT_NOTICE=" $MOMENT_DIR /MOMENT_IN_ADMINUIASSETS.txt"
64- MOMENT_TIMEZONE_DIR=" $VENDOR_DIR /moment-timezone"
65- MOMENT_TIMEZONE_NOTICE=" $MOMENT_TIMEZONE_DIR /MOMENT_TIMEZONE_IN_ADMINUIASSETS.txt"
66- D3_DIR=" $VENDOR_DIR /d3"
67- D3_NOTICE=" $D3_DIR /D3_IN_ADMINUIASSETS.txt"
68- DAGRE_D3_DIR=" $VENDOR_DIR /dagre-d3"
69- DAGRE_D3_NOTICE=" $DAGRE_D3_DIR /DAGRE_D3_IN_ADMINUIASSETS.txt"
70- JS_MD5_DIR=" $VENDOR_DIR /js-md5"
71- JS_MD5_NOTICE=" $JS_MD5_DIR /JS_MD5_IN_ADMINUIASSETS.txt"
72- CHART_JS_DIR=" $VENDOR_DIR /chart-js"
73- CHART_JS_NOTICE=" $CHART_JS_DIR /CHART_JS_IN_ADMINUIASSETS.txt"
74- CHARTJS_PLUGIN_DATALABELS_DIR=" $VENDOR_DIR /chartjs-plugin-datalabels"
75- CHARTJS_PLUGIN_DATALABELS_NOTICE=" $CHARTJS_PLUGIN_DATALABELS_DIR /CHARTJS_PLUGIN_DATALABELS_IN_ADMINUIASSETS.txt"
76-
7747CURRENT_BRANCH=` git branch | grep ' *' | cut -d ' ' -f 2`
7848TMP_BRANCH=" version_$VERSION "
7949TAG=" v$VERSION "
@@ -82,92 +52,8 @@ echo "# Switching to $BRANCH and updating"
8252git checkout -q $BRANCH > /dev/null && git pull > /dev/null
8353check_process " switch to $BRANCH "
8454
85- echo " # Removing the assets"
86- [ ! -d " $VENDOR_DIR " ] && mkdir -p $VENDOR_DIR
87- [ -d " $VENDOR_DIR " ] && rm -rf $VENDOR_DIR /*
88- check_process " clean the vendor dir $VENDOR_DIR "
89-
90- echo " # Removing yarn.lock"
91- rm " yarn.lock"
92-
93- echo " # Installing dependendencies"
94- yarn install
95- yarn run prepare-release
96-
97- echo " # Removing unused files from Bootstrap"
98- rm -r " $BOOTSTRAP_DIR /dist/css" " $BOOTSTRAP_DIR /js" $BOOTSTRAP_DIR /dist/js/bootstrap.js $BOOTSTRAP_DIR /dist/js/bootstrap.js.map $BOOTSTRAP_DIR /dist/js/bootstrap.bundle.js $BOOTSTRAP_DIR /dist/js/bootstrap.bundle.js.map $BOOTSTRAP_DIR /dist/js/bootstrap.bundle.min.js $BOOTSTRAP_DIR /dist/js/bootstrap.bundle.min.js.map
99- check_process " clean bootstrap"
100- echo " This is a customized Bootstrap version." > $BOOTSTRAP_NOTICE
101- echo " To decrease the size of the bundle, it includes production-only files" >> $BOOTSTRAP_NOTICE
102-
103- echo " # Removing unused files from Flatpickr"
104- rm -r " $FLATPICKR_DIR /src" $FLATPICKR_DIR /dist/flatpickr.css $FLATPICKR_DIR /dist/flatpickr.js $FLATPICKR_DIR /dist/ie.css $FLATPICKR_DIR /README.md
105- check_process " clean flatpickr"
106- echo " This is a customized Flatpickr version." > $FLATPICKR_NOTICE
107- echo " To decrease the size of the bundle, it includes production-only files" >> $FLATPICKR_NOTICE
108-
109- echo " # Removing unused files from jQuery"
110- rm -r " $JQUERY_DIR /src" $JQUERY_DIR /dist/jquery.js $JQUERY_DIR /dist/jquery.min.map $JQUERY_DIR /dist/jquery.slim.js $JQUERY_DIR /dist/jquery.slim.min.js $JQUERY_DIR /dist/jquery.slim.min.map $JQUERY_DIR /AUTHORS.txt $JQUERY_DIR /bower.json $JQUERY_DIR /README.md
111- check_process " clean jquery"
112- echo " This is a customized jQuery version." > $JQUERY_NOTICE
113- echo " To decrease the size of the bundle, it includes production-only files" >> $JQUERY_NOTICE
114-
115- echo " # Removing unused files from Leaflet"
116- rm -r " $LEAFLET_DIR /src" $LEAFLET_DIR /CHANGELOG.md $LEAFLET_DIR /README.md
117- check_process " clean Leaflet"
118- echo " This is a customized Leaflet version." > $LEAFLET_NOTICE
119- echo " To decrease the size of the bundle, it includes production-only files" >> $LEAFLET_NOTICE
120-
121- echo " # Removing unused files from Popper"
122- rm -r " $POPPER_DIR /core/dist/esm" $POPPER_DIR /core/dist/umd/popper.js $POPPER_DIR /core/dist/umd/popper.js.map
123- check_process " clean popperjs"
124- echo " This is a customized Popperjs version." > $POPPER_NOTICE
125- echo " To decrease the size of the bundle, it includes production-only files" >> $POPPER_NOTICE
126-
127- echo " This is a customized React version." > $REACT_NOTICE
128- echo " To decrease the size of the bundle, it includes production-only files" >> $REACT_NOTICE
129-
130- echo " # Removing unused files from react-dom"
131- rm -r $REACT_DOM_DIR /server.js $REACT_DOM_DIR /test-utils.js
132- check_process " clean ReactDOM"
133- echo " This is a customized ReactDOM version." > $REACT_DOM_NOTICE
134- echo " To decrease the size of the bundle, it includes production-only files" >> $REACT_DOM_NOTICE
135-
136- echo " # Removing unused files from moment"
137- rm -r " $MOMENT_DIR /src"
138- check_process " clean moment"
139- echo " This is a customized moment version." > $MOMENT_NOTICE
140- echo " To decrease the size of the bundle, it includes production-only files" >> $MOMENT_NOTICE
141-
142- echo " # Removing unused files from moment-timezone"
143- rm -r " $MOMENT_TIMEZONE_DIR /data"
144- check_process " clean moment-timezone"
145- echo " This is a customized moment version." > $MOMENT_TIMEZONE_NOTICE
146- echo " To decrease the size of the bundle, it includes production-only files" >> $MOMENT_TIMEZONE_NOTICE
147-
148- echo " # Removing unused files from d3"
149- rm -r " $D3_DIR /node_modules" $D3_DIR /CHANGES.md $D3_DIR /index.js $D3_DIR /dist/d3.node.js $D3_DIR /dist/package.js
150- check_process " clean d3"
151- echo " This is a customized d3 version." > $D3_NOTICE
152- echo " To decrease the size of the bundle, it includes production-only files" >> $D3_NOTICE
153-
154- echo " # Removing unused files from dagre-d3"
155- rm -r " $DAGRE_D3_DIR /lib" " $DAGRE_D3_DIR /dist/demo" $DAGRE_D3_DIR /.jshintrc $DAGRE_D3_DIR /bower.json $DAGRE_D3_DIR /index.js $DAGRE_D3_DIR /karma.conf.js $DAGRE_D3_DIR /karma.core.conf.js $DAGRE_D3_DIR /dist/dagre-d3.core.js $DAGRE_D3_DIR /dist/dagre-d3.core.min.js $DAGRE_D3_DIR /dist/dagre-d3.core.min.js.map
156- check_process " clean dagre-d3"
157- echo " This is a customized dagre-d3 version." > $DAGRE_D3_NOTICE
158- echo " To decrease the size of the bundle, it includes production-only files" >> $DAGRE_D3_NOTICE
159-
160- echo " # Removing unused files from js-md5"
161- rm -r " $JS_MD5_DIR /src"
162- check_process " clean js-md5"
163- echo " This is a customized js-md5 version." > $JS_MD5_NOTICE
164- echo " To decrease the size of the bundle, it includes production-only files" >> $JS_MD5_NOTICE
165-
166- echo " This is a customized chart-js version." > $CHART_JS_NOTICE
167- echo " To decrease the size of the bundle, it includes production-only files" >> $CHART_JS_NOTICE
168-
169- echo " This is a customized chartjs-plugin-datalabels version." > $CHARTJS_PLUGIN_DATALABELS_NOTICE
170- echo " To decrease the size of the bundle, it includes production-only files" >> $CHARTJS_PLUGIN_DATALABELS_NOTICE
55+ ./bin/prepare_release_files.sh
56+ check_process " prepare the release files"
17157
17258echo " # Creating the custom branch: $TMP_BRANCH "
17359git checkout -q -b " $TMP_BRANCH " > /dev/null
0 commit comments