Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions pkg/mac/build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,29 @@ _complete_bundle() {
pushd "${SOURCE_DIR}/web" > /dev/null || exit
yarn set version berry
yarn set version 4
yarn install
yarn run bundle
yarn install 2>&1

# Record the source commit hash before the heavy lint/webpack
# steps. `yarn run` needs node_modules so this runs after install,
# but it's a pure `git log` redirect (see web/package.json
# "git:hash") that costs ~nothing, so doing it up front means the
# commit_hash file is captured even if webpack later bails out.
echo "==> Recording git hash..."
yarn run git:hash
Comment thread
asheshv marked this conversation as resolved.

# Split the "bundle" script into its underlying steps and merge
# stderr into stdout, so a crash inside lint/webpack (e.g. an OOM
# kill or native-module load failure) leaves a trace in the
# Jenkins console instead of an empty gap before the trap fires.
# Env vars match the top-level "bundle" npm script (see web/package.json)
# so behavior is identical to `yarn run bundle`.
export NODE_ENV=production
export NODE_OPTIONS=--max-old-space-size=3072
echo "==> Running ESLint..."
yarn run linter 2>&1
echo "==> Running webpack bundle..."
yarn run webpacker 2>&1
Comment thread
asheshv marked this conversation as resolved.
unset NODE_ENV NODE_OPTIONS

curl https://curl.se/ca/cacert.pem -o cacert.pem -s
popd > /dev/null || exit
Expand Down
Loading