@@ -117,17 +117,26 @@ for BRANCH in "tatter/scratch" "tatter/patches"; do
117
117
done
118
118
119
119
# Display environment info
120
+ echo " ************************************"
121
+ echo " * CONFIGURATION *"
122
+ echo " ************************************"
123
+ echo " "
120
124
echo " Scripts Directory: $SCRIPTS "
121
125
echo " Project Directory: $ROOT "
122
126
echo " Target Version: $TARGET_VERSION "
123
127
echo " Current Version: $SOURCE_VERSION "
124
128
echo " Source Package: $PACKAGE "
125
129
echo " Base Branch: $BASE "
126
130
echo " Selected Items: $ITEMS "
131
+ echo " "
127
132
128
133
# From here on everything is destructive (but reversible) so we want hard stops
129
134
set -e
130
135
136
+ echo " ************************************"
137
+ echo " * STAGING *"
138
+ echo " ************************************"
139
+ echo " "
131
140
# Create a blank branch to work on
132
141
git switch --orphan tatter/scratch
133
142
@@ -137,7 +146,7 @@ git clean -fd
137
146
138
147
# If a current version was requested then change vendor first
139
148
if [ " $CURRENT_VERSION " ]; then
140
- composer require " $PACKAGE " " $CURRENT_VERSION "
149
+ composer require --no-scripts " $PACKAGE " " $CURRENT_VERSION "
141
150
git restore composer.*
142
151
fi
143
152
@@ -153,10 +162,10 @@ git commit -m "Stage framework" > /dev/null
153
162
154
163
# Check for a specific requested version
155
164
if [ " $TARGET_VERSION " ]; then
156
- composer require " $PACKAGE " " $TARGET_VERSION "
165
+ composer require --no-scripts " $PACKAGE " " $TARGET_VERSION "
157
166
# Otherwise get the latest
158
167
else
159
- composer update " $PACKAGE "
168
+ composer update --no-scripts " $PACKAGE "
160
169
fi
161
170
162
171
# Wipe out the current versions and copy in the new
@@ -177,14 +186,23 @@ rm composer.*
177
186
git switch -c tatter/patches " $BASE "
178
187
179
188
# Restore the original state of vendor/
180
- composer install > /dev/null
189
+ composer install --no-scripts > /dev/null
190
+
191
+ echo " ************************************"
192
+ echo " * MERGING *"
193
+ echo " ************************************"
194
+ echo " "
181
195
182
196
# Attempt the merge
183
197
set +e
184
198
git cherry-pick tatter/scratch
185
199
186
200
if [ $? -eq 0 ]; then
187
- echo " Patch successful! Changes available on branch tatter/patches."
201
+ echo " ************************************"
202
+ echo " * SUCCESS *"
203
+ echo " ************************************"
204
+ echo " "
205
+ echo " Patch successful! Updated files are available on branch tatter/patches."
188
206
git branch -D tatter/scratch
189
207
exit 0
190
208
fi
@@ -193,6 +211,10 @@ git status
193
211
194
212
# Conflict: explain and exit
195
213
echo " "
214
+ echo " ************************************"
215
+ echo " * RESOLUTION *"
216
+ echo " ************************************"
217
+ echo " "
196
218
echo " Conflicts detected during patch! Follow the git instructions for resolution."
197
219
echo " Once resolution is complete your changes will be available on branch tatter/patches"
198
220
echo " and you should remove the old working branch at tatter/scratch."
0 commit comments