mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Testing postinst/prerm scripts with the UI .deb (#11258)
This commit is contained in:
parent
cb98258a8e
commit
077c8db1ff
7
build_scripts/assets/deb/postinst.sh
Normal file
7
build_scripts/assets/deb/postinst.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Post install script for the UI .deb to place symlinks in places to allow the CLI to work similarly in both versions
|
||||
|
||||
set -e
|
||||
|
||||
ln -s /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon/chia /usr/bin/chia || true
|
||||
ln -s /usr/lib/chia-blockchain/resources/app.asar.unpacked/daemon /opt/chia || true
|
7
build_scripts/assets/deb/prerm.sh
Normal file
7
build_scripts/assets/deb/prerm.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Pre remove script for the UI .deb to clean up the symlinks from the installer
|
||||
|
||||
set -e
|
||||
|
||||
unlink /usr/bin/chia || true
|
||||
unlink /opt/chia || true
|
@ -98,8 +98,10 @@ cd ../../../build_scripts || exit
|
||||
echo "Create chia-$CHIA_INSTALLER_VERSION.deb"
|
||||
rm -rf final_installer
|
||||
mkdir final_installer
|
||||
electron-installer-debian --src dist/$DIR_NAME/ --dest final_installer/ \
|
||||
--arch "$PLATFORM" --options.version $CHIA_INSTALLER_VERSION --options.bin chia-blockchain --options.name chia-blockchain
|
||||
electron-installer-debian --src "dist/$DIR_NAME/" \
|
||||
--arch "$PLATFORM" \
|
||||
--options.version "$CHIA_INSTALLER_VERSION" \
|
||||
--config deb-options.json
|
||||
LAST_EXIT_CODE=$?
|
||||
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
|
||||
echo >&2 "electron-installer-debian failed!"
|
||||
|
9
build_scripts/deb-options.json
Normal file
9
build_scripts/deb-options.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"dest": "final_installer/",
|
||||
"bin": "chia-blockchain",
|
||||
"name": "chia-blockchain",
|
||||
"scripts": {
|
||||
"postinst": "assets/deb/postinst.sh",
|
||||
"prerm": "assets/deb/prerm.sh"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user