The macOS x64 appbundle build can fail inside `yarn run bundle` while producing zero console output -- the Jenkins log goes straight from "yarn install ... Done with warnings" to the EXIT trap's failure message, leaving no signal as to whether linter, webpack, or a native module load was the culprit (build #1293 on pgabf-macos-x64 is the prompting example). Split the bundled script into its constituent steps and merge stderr into stdout so any error text reaches the console even if Jenkins' shell step drops a tail buffer: yarn install yarn run git:hash # cheap source-hash capture, moved up front yarn run linter yarn run webpacker `git:hash` is a pure `git log` redirect (see web/package.json) with no node-module dependency, but `yarn run` needs node_modules so it stays after install. Pulling it before the heavy steps means the commit_hash file lands on disk even if webpack later bails out. Env vars NODE_ENV=production and NODE_OPTIONS=--max-old-space-size=3072 are set explicitly to mirror the cross-env wrapper inside the top-level "bundle" npm script, so build output stays byte-identical to before. No-op for successful builds; pure diagnostics win on failure.
pgAdmin macOS Builds
Required Packages
Either build the sources or get them from macports or similar:
-
Yarn & NodeJS
-
PostgreSQL 12 or above from http://www.postgresql.org/
-
Python 3.6+ (required for building). The build environment should run this version of python in response to the python command.
Building
-
To bundle a different version of Python from the default of 3.13.1, set the PGADMIN_PYTHON_VERSION environment variable, e.g:
export PGADMIN_PYTHON_VERSION=3.13.11 -
If a path different from the default of /usr/local/pgsql for the PostgreSQL installation has been used, set the PGADMIN_POSTGRES_DIR environment variable appropriately, e.g:
export PGADMIN_POSTGRES_DIR=/opt/local/pgsql -
If you want to codesign the appbundle, copy codesign.conf.in to codesign.conf and set the values accordingly.
-
If you want to notarize the appbundle, copy notarization.conf.in to notarization.conf and set the values accordingly. Note that notarization will fail if the code isn't signed.
-
To build only DMG file, go to pgAdmin4 source root directory and execute:
make appbundleTo build both DMG and ZIP files, go to pgAdmin4 source root directory and execute:
make appbundle BUILD_OPTS="--zip"This will create the python virtual environment and install all the required python modules mentioned in the requirements file using pip, build the runtime code and finally create the app bundle and the DMG and/or ZIP in ./dist directory.