From 0ab4e68f6d2623e2ea8015b195646f29531bdce5 Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Wed, 6 May 2020 10:58:14 +0200
Subject: [PATCH] [fix] Add comment on release script

---
 gulpfile.js        | 4 ++++
 scripts/release.sh | 9 +++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 93fd75d5a..0a557d29d 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -792,6 +792,8 @@ const webCompile = gulp.series(
   webCleanUnusedFiles,
   webCleanUnusedDirectories
 );
+
+// note : Do not call config, to keep same config between web and webExt artifacts
 const webBuild = gulp.series(
   webClean,
   webCompile,
@@ -803,6 +805,8 @@ const webExtCompile = gulp.series(
   webCompile,
   webExtCopyFiles
 );
+
+// note : Do not call config, to keep same config between web and webExt artifacts
 const webExtBuild = gulp.series(
   webExtCompile,
   webExtensionZip,
diff --git a/scripts/release.sh b/scripts/release.sh
index 4fecf07b2..43f5d1438 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -98,9 +98,8 @@ mkdir -p ${DIST_ANDROID} || exit 1
 rm -rf ${DIST_ANDROID}/*.apk || exit 1
 rm -rf ${ANDROID_OUTPUT_APK_RELEASE}/*.apk || exit 1
 . scripts/build-android.sh --release
-if [[ $? -ne 0 ]]; then
-  exit 1
-fi
+[[ $? -ne 0 ]] && exit 1
+
 APK_RELEASE_FILE="${ANDROID_OUTPUT_APK_RELEASE}/android-release.apk"
 if [[ ! -f "${APK_RELEASE_FILE}" ]]; then
   echo "ERROR: Missing android artifact at ${APK_RELEASE_FILE}"
@@ -115,8 +114,10 @@ echo "- Building web and extension artifacts..."
 echo "----------------------------------"
 cd ${PROJECT_DIR} || exit 1
 
-# Run web build
+# Gnerate config (only once, to keep same config if web and web-extension artifacts)
 gulp config --env default
+
+# Run web build
 gulp webBuild --release
 [[ $? -ne 0 ]] && exit 1
 
-- 
GitLab