chore: distrowise build scripts

This commit is contained in:
Anoop M D 2023-10-13 23:59:30 +05:30
parent e218b8276d
commit 442e68283d
3 changed files with 25 additions and 1 deletions

View File

@ -31,6 +31,11 @@
"dev:electron": "npm run dev --workspace=packages/bruno-electron", "dev:electron": "npm run dev --workspace=packages/bruno-electron",
"build:bruno-query": "npm run build --workspace=packages/bruno-query", "build:bruno-query": "npm run build --workspace=packages/bruno-query",
"build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs", "build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs",
"build:electron:mac": "./scripts/build-electron.sh mac",
"build:electron:win": "./scripts/build-electron.sh win",
"build:electron:linux": "./scripts/build-electron.sh linux",
"build:electron:deb": "./scripts/build-electron.sh deb",
"build:electron:rpm": "./scripts/build-electron.sh rpm",
"build:electron:snap": "./scripts/build-electron.sh snap", "build:electron:snap": "./scripts/build-electron.sh snap",
"test:e2e": "npx playwright test", "test:e2e": "npx playwright test",
"test:report": "npx playwright show-report", "test:report": "npx playwright show-report",

View File

@ -9,7 +9,11 @@
"scripts": { "scripts": {
"clean": "rimraf dist", "clean": "rimraf dist",
"dev": "electron .", "dev": "electron .",
"dist": "electron-builder --mac --config electron-builder-config.js", "dist:mac": "electron-builder --mac --config electron-builder-config.js",
"dist:win": "electron-builder --win --config electron-builder-config.js",
"dist:linux": "electron-builder --linux AppImage --config electron-builder-config.js",
"dist:deb": "electron-builder --linux deb --config electron-builder-config.js",
"dist:rpm": "electron-builder --linux rpm --config electron-builder-config.js",
"dist:snap": "electron-builder --linux snap --config electron-builder-config.js", "dist:snap": "electron-builder --linux snap --config electron-builder-config.js",
"pack": "electron-builder --dir", "pack": "electron-builder --dir",
"test": "jest" "test": "jest"

View File

@ -22,6 +22,21 @@ find packages/bruno-electron/web -name '*.map' -type f -delete
if [ "$1" == "snap" ]; then if [ "$1" == "snap" ]; then
echo "Building snap distribution" echo "Building snap distribution"
npm run dist:snap --workspace=packages/bruno-electron npm run dist:snap --workspace=packages/bruno-electron
elif [ "$1" == "mac" ]; then
echo "Building mac distribution"
npm run dist:mac --workspace=packages/bruno-electron
elif [ "$1" == "win" ]; then
echo "Building windows distribution"
npm run dist:win --workspace=packages/bruno-electron
elif [ "$1" == "deb" ]; then
echo "Building debian distribution"
npm run dist:deb --workspace=packages/bruno-electron
elif [ "$1" == "rpm" ]; then
echo "Building rpm distribution"
npm run dist:rpm --workspace=packages/bruno-electron
elif [ "$1" == "linux" ]; then
echo "Building linux distribution"
npm run dist:linux --workspace=packages/bruno-electron
else else
echo "Please pass a build distribution type" echo "Please pass a build distribution type"
fi fi