Build changes to sign pgAdmin4.exe and use yarn v3 on linux builds

This commit is contained in:
Aditya Toshniwal 2024-08-01 13:18:01 +05:30
parent 5d7ec14076
commit 4ee76ba8c9
2 changed files with 27 additions and 1 deletions

View File

@ -26,6 +26,7 @@ CALL :CLEAN || EXIT /B 1
CALL :CREATE_VIRTUAL_ENV || EXIT /B 1 CALL :CREATE_VIRTUAL_ENV || EXIT /B 1
CALL :CREATE_PYTHON_ENV || EXIT /B 1 CALL :CREATE_PYTHON_ENV || EXIT /B 1
CALL :CREATE_RUNTIME_ENV || EXIT /B 1 CALL :CREATE_RUNTIME_ENV || EXIT /B 1
CALL :SIGN_PGADMIN_EXE || EXIT /B 1
CALL :GENERATE_SBOM || EXIT /B 1 CALL :GENERATE_SBOM || EXIT /B 1
CALL :CREATE_INSTALLER || EXIT /B 1 CALL :CREATE_INSTALLER || EXIT /B 1
CALL :SIGN_INSTALLER || EXIT /B 1 CALL :SIGN_INSTALLER || EXIT /B 1
@ -358,6 +359,21 @@ REM Main build sequence Ends
ECHO Generating SBOM... ECHO Generating SBOM...
CALL syft "%BUILDROOT%" -o cyclonedx-json > "%BUILDROOT%\sbom.json" CALL syft "%BUILDROOT%" -o cyclonedx-json > "%BUILDROOT%\sbom.json"
EXIT /B 0
:SIGN_PGADMIN_EXE
ECHO Attempting to sign the pgAdmin4 exe..
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%BUILDROOT%\runtime\pgAdmin4.exe"
IF %ERRORLEVEL% NEQ 0 (
ECHO.
ECHO ************************************************************
ECHO * Failed to sign the pgAdmin4 exe...
ECHO ************************************************************
PAUSE
)
EXIT /B 0
:SIGN_INSTALLER :SIGN_INSTALLER
ECHO Attempting to sign the installer... ECHO Attempting to sign the installer...
CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%DISTROOT%\%INSTALLERNAME%" CALL "%PGADMIN_SIGNTOOL_DIR%\signtool.exe" sign /tr http://timestamp.digicert.com "%DISTROOT%\%INSTALLERNAME%"

View File

@ -171,7 +171,15 @@ _build_runtime() {
cp -r "${SOURCEDIR}/runtime/src" "${BUNDLEDIR}/resources/app/src" cp -r "${SOURCEDIR}/runtime/src" "${BUNDLEDIR}/resources/app/src"
cp "${SOURCEDIR}/runtime/package.json" "${BUNDLEDIR}/resources/app" cp "${SOURCEDIR}/runtime/package.json" "${BUNDLEDIR}/resources/app"
yarn --cwd "${BUNDLEDIR}/resources/app" install --production=true
# Install the runtime node_modules
pushd "${BUNDLEDIR}/resources/app" > /dev/null || exit
yarn set version berry
yarn set version 3
yarn plugin import workspace-tools
yarn workspaces focus --production
popd > /dev/null || exit
# Create the icon # Create the icon
mkdir -p "${DESKTOPROOT}/usr/share/icons/hicolor/128x128/apps/" mkdir -p "${DESKTOPROOT}/usr/share/icons/hicolor/128x128/apps/"
@ -212,6 +220,8 @@ _copy_code() {
find "${SERVERROOT}/usr/${APP_NAME}/venv/" -name "_tkinter*" -print0 | xargs -0 rm -rf find "${SERVERROOT}/usr/${APP_NAME}/venv/" -name "_tkinter*" -print0 | xargs -0 rm -rf
pushd "${SOURCEDIR}/web" > /dev/null || exit pushd "${SOURCEDIR}/web" > /dev/null || exit
yarn set version berry
yarn set version 3
yarn install yarn install
yarn run bundle yarn run bundle
popd > /dev/null || exit popd > /dev/null || exit