Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed lerna from build_scripts #18180

Merged
merged 5 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 2 additions & 6 deletions build_scripts/build_linux_deb-1-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@

set -o errexit

echo "Installing global npm packages"
cd npm_linux || exit 1
npm ci

cd ../../ || exit 1
emlowe marked this conversation as resolved.
Show resolved Hide resolved
cd ../ || exit 1
git submodule update --init chia-blockchain-gui

cd ./chia-blockchain-gui || exit 1

echo "npm build"
npx lerna clean -y
npx --no lerna clean -y # With --no option, `npx` guarantees not to install package from remote registry
npm ci
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
# npm audit fix
Expand Down
5 changes: 3 additions & 2 deletions build_scripts/build_linux_deb-2-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export CHIA_INSTALLER_VERSION
echo "Installing npm and electron packagers"
cd npm_linux || exit 1
npm ci
NPM_PATH="$(pwd)/node_modules/.bin"
cd .. || exit 1

echo "Create dist/"
Expand Down Expand Up @@ -108,12 +109,12 @@ if [ "$PLATFORM" = "arm64" ]; then
--config ../../../build_scripts/electron-builder.json
LAST_EXIT_CODE=$?
else
echo electron-builder build --linux deb --x64 \
echo "${NPM_PATH}/electron-builder" build --linux deb --x64 \
--config.extraMetadata.name=chia-blockchain \
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
--config.deb.packageName="chia-blockchain" \
--config ../../../build_scripts/electron-builder.json
npx electron-builder build --linux deb --x64 \
emlowe marked this conversation as resolved.
Show resolved Hide resolved
"${NPM_PATH}/electron-builder" build --linux deb --x64 \
--config.extraMetadata.name=chia-blockchain \
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
--config.deb.packageName="chia-blockchain" \
Expand Down
8 changes: 2 additions & 6 deletions build_scripts/build_linux_rpm-1-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

set -o errexit

echo "Installing global npm packages"
cd npm_linux || exit 1
npm ci

cd ../../ || exit 1
cd ../ || exit 1
git submodule update --init chia-blockchain-gui

cd ./chia-blockchain-gui || exit 1
echo "npm build"
npx lerna clean -y
npx --no lerna clean -y # With --no option, `npx` guarantees not to install package from remote registry
npm ci
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
# npm audit fix
Expand Down
5 changes: 3 additions & 2 deletions build_scripts/build_linux_rpm-2-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ echo "Chia Installer Version is: $CHIA_INSTALLER_VERSION"
echo "Installing npm and electron packagers"
cd npm_linux || exit 1
npm ci
NPM_PATH="$(pwd)/node_modules/.bin"
cd .. || exit 1

echo "Create dist/"
Expand Down Expand Up @@ -101,12 +102,12 @@ if [ "$REDHAT_PLATFORM" = "arm64" ]; then
OPT_ARCH="--arm64"
fi
PRODUCT_NAME="chia"
echo npx electron-builder build --linux rpm "${OPT_ARCH}" \
echo "${NPM_PATH}/electron-builder" build --linux rpm "${OPT_ARCH}" \
--config.extraMetadata.name=chia-blockchain \
--config.productName="${PRODUCT_NAME}" --config.linux.desktop.Name="Chia Blockchain" \
--config.rpm.packageName="chia-blockchain" \
--config ../../../build_scripts/electron-builder.json
npx electron-builder build --linux rpm "${OPT_ARCH}" \
"${NPM_PATH}/electron-builder" build --linux rpm "${OPT_ARCH}" \
--config.extraMetadata.name=chia-blockchain \
--config.productName="${PRODUCT_NAME}" --config.linux.desktop.Name="Chia Blockchain" \
--config.rpm.packageName="chia-blockchain" \
Expand Down
7 changes: 2 additions & 5 deletions build_scripts/build_macos-1-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ set -o errexit -o nounset

git status

echo "Installing global npm packages"
cd npm_macos || exit 1
npm ci
cd ../../ || exit 1
cd ../ || exit 1
git submodule update --init chia-blockchain-gui

cd ./chia-blockchain-gui || exit 1
echo "npm build"
npx lerna clean -y
npx --no lerna clean -y # With --no option, `npx` guarantees not to install package from remote registry
npm ci
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
# npm audit fix
Expand Down
11 changes: 9 additions & 2 deletions build_scripts/build_macos-2-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ echo "Chia Installer Version is: $CHIA_INSTALLER_VERSION"
echo "Installing npm utilities"
cd npm_macos || exit 1
npm ci
NPM_PATH="$(pwd)/node_modules/.bin"
cd .. || exit 1

echo "Create dist/"
Expand Down Expand Up @@ -66,8 +67,14 @@ else
echo "Not on ci or no secrets so not signing"
export CSC_IDENTITY_AUTO_DISCOVERY=false
fi
echo npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11" --config ../../../build_scripts/electron-builder.json
npx electron-builder build --mac "${OPT_ARCH}" --config.productName="$PRODUCT_NAME" --config.mac.minimumSystemVersion="11" --config ../../../build_scripts/electron-builder.json
echo "${NPM_PATH}/electron-builder" build --mac "${OPT_ARCH}" \
--config.productName="$PRODUCT_NAME" \
--config.mac.minimumSystemVersion="11" \
--config ../../../build_scripts/electron-builder.json
"${NPM_PATH}/electron-builder" build --mac "${OPT_ARCH}" \
--config.productName="$PRODUCT_NAME" \
--config.mac.minimumSystemVersion="11" \
--config ../../../build_scripts/electron-builder.json
LAST_EXIT_CODE=$?
ls -l dist/mac*/chia.app/Contents/Resources/app.asar

Expand Down
10 changes: 2 additions & 8 deletions build_scripts/build_windows-1-gui.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ $ErrorActionPreference = "Stop"

git status

Write-Output " ---"
Write-Output "Setup npm packager"
Write-Output " ---"
Set-Location -Path ".\npm_windows" -PassThru
npm ci

Set-Location -Path "..\..\" -PassThru
Set-Location -Path "..\" -PassThru
git submodule update --init chia-blockchain-gui

Set-Location -Path ".\chia-blockchain-gui" -PassThru
Expand All @@ -21,7 +15,7 @@ Write-Output " ---"
$Env:NODE_OPTIONS = "--max-old-space-size=3000"

Write-Output "lerna clean -y"
npx lerna clean -y
npx --no lerna clean -y # With --no option, `npx` guarantees not to install package from remote registry
Write-Output "npm ci"
npm ci
# Audit fix does not currently work with Lerna. See https://github.com/lerna/lerna/issues/1663
Expand Down
6 changes: 5 additions & 1 deletion build_scripts/build_windows-2-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Write-Output "Setup npm packager"
Write-Output " ---"
Set-Location -Path ".\npm_windows" -PassThru
npm ci
$NPM_PATH = $pwd.PATH + "\node_modules\.bin"

Set-Location -Path "..\..\" -PassThru

Expand Down Expand Up @@ -68,7 +69,10 @@ Write-Output " ---"

Write-Output " ---"
Write-Output "electron-builder create package directory"
npx electron-builder build --win --x64 --config.productName="Chia" --dir --config ../../../build_scripts/electron-builder.json
$OLD_ENV_PATH = $Env:Path
$Env:Path = $NPM_PATH + ";" + $Env:Path
electron-builder build --win --x64 --config.productName="Chia" --dir --config ../../../build_scripts/electron-builder.json
$Env:Path = $OLD_ENV_PATH
Get-ChildItem dist\win-unpacked\resources
Write-Output " ---"

Expand Down
Loading
Loading