Skip to content

Commit da4790d

Browse files
authored
build: only check patch diffs in testing builds (electron#26283)
* build: only check patch diffs in testing builds * Fixup patch indices
1 parent 4088566 commit da4790d

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

.circleci/config.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ env-release-build: &env-release-build
107107
STRIP_BINARIES: true
108108
GENERATE_SYMBOLS: true
109109
CHECK_DIST_MANIFEST: '1'
110+
IS_RELEASE: true
110111

111112
env-headless-testing: &env-headless-testing
112113
DISPLAY: ':99.0'
@@ -256,23 +257,25 @@ step-gclient-sync: &step-gclient-sync
256257
"$CIRCLE_REPOSITORY_URL"
257258
258259
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
259-
# Re-export all the patches to check if there were changes.
260-
python src/electron/script/export_all_patches.py src/electron/patches/config.json
261-
cd src/electron
262-
git update-index --refresh || true
263-
if ! git diff-index --quiet HEAD --; then
264-
# There are changes to the patches. Make a git commit with the updated patches
265-
git add patches
266-
GIT_COMMITTER_NAME="Electron Bot" GIT_COMMITTER_EMAIL="anonymous@electronjs.org" git commit -m "update patches" --author="Electron Bot <anonymous@electronjs.org>"
267-
# Export it
268-
mkdir -p ../../patches
269-
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
270-
echo
271-
echo "======================================================================"
272-
echo "There were changes to the patches when applying."
273-
echo "Check the CI artifacts for a patch you can apply to fix it."
274-
echo "======================================================================"
275-
exit 1
260+
if [ "$IS_RELEASE" != "true" ]; then
261+
# Re-export all the patches to check if there were changes.
262+
python src/electron/script/export_all_patches.py src/electron/patches/config.json
263+
cd src/electron
264+
git update-index --refresh || true
265+
if ! git diff-index --quiet HEAD --; then
266+
# There are changes to the patches. Make a git commit with the updated patches
267+
git add patches
268+
GIT_COMMITTER_NAME="Electron Bot" GIT_COMMITTER_EMAIL="anonymous@electronjs.org" git commit -m "update patches" --author="Electron Bot <anonymous@electronjs.org>"
269+
# Export it
270+
mkdir -p ../../patches
271+
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
272+
echo
273+
echo "======================================================================"
274+
echo "There were changes to the patches when applying."
275+
echo "Check the CI artifacts for a patch you can apply to fix it."
276+
echo "======================================================================"
277+
exit 1
278+
fi
276279
fi
277280
fi
278281

0 commit comments

Comments
 (0)