Skip to content

Commit 454fd15

Browse files
authored
Merge pull request #2739 from opossum-tool/feat_build_snap_and_app_image
feat: create .snap and app image for linux
2 parents d46dd63 + b5ff043 commit 454fd15

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

.github/workflows/build-and-e2e-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
os: [ubuntu-22.04, macos-13, windows-latest]
25+
os: [ubuntu-latest, macos-13, windows-latest]
2626
include:
27-
- os: ubuntu-22.04
27+
- os: ubuntu-latest
2828
# https://github.com/microsoft/playwright/issues/11932
2929
E2E: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn test:e2e:ci
3030
- os: macos-13

package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"update-commit-hash:darwin:linux": "COMMIT_INFO=$(git describe --exact-match --tags 2> /dev/null || git rev-parse --short HEAD); echo \"{\\\"commitInfo\\\" : \\\"$COMMIT_INFO\\\" }\" > \"src/commitInfo.json\"",
132132
"update-commit-hash:win32": "tools/get_app_version_for_windows.bat",
133133
"generate-notice": "mkdirp notices && yarn licenses generate-disclaimer --production > notices/notices.txt && yarn node tools/generateNotices.mjs",
134-
"ship-linux": "yarn install-deps:linux && yarn build && electron-builder --linux --x64 --publish never && mkdir -p release/linux && mv 'release/OpossumUI-0.1.0.AppImage' 'release/linux/OpossumUI-for-linux.AppImage'",
134+
"ship-linux": "yarn install-deps:linux && yarn build && tools/build_linux_release.sh",
135135
"ship-win": "yarn install-deps:win32 && yarn build && electron-builder --win --x64 --publish never && mkdirp release/win && mv \"release/OpossumUI Setup 0.1.0.exe\" \"release/win/OpossumUI-for-win.exe\"",
136136
"ship-mac": "yarn install-deps:darwin && yarn build && electron-builder --mac --x64 --publish never && zip -r -y -q 'release/mac/OpossumUI-for-mac.zip' 'release/mac/'",
137137
"ship": "yarn ship-linux && yarn ship-win && yarn ship-mac",
@@ -169,8 +169,12 @@
169169
"icon": "public/icons/icon_512x512.png"
170170
},
171171
"linux": {
172-
"target": "AppImage",
173-
"icon": "public/icons/icon_512x512.png"
172+
"target": [
173+
"snap",
174+
"AppImage"
175+
],
176+
"icon": "public/icons/icon_512x512.png",
177+
"category": "Development"
174178
},
175179
"extraMetadata": {
176180
"main": "build/ElectronBackend/app.js"

src/e2e-tests/utils/fixtures.ts

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export const test = base.extend<{
7979

8080
const [executablePath, main] = getLaunchProps();
8181
const args = ['--reset'];
82+
if (os.platform() === 'linux') {
83+
args.push('--no-sandbox');
84+
}
8285

8386
const app = await electron.launch({
8487
args: [main, ...(!filePath ? args : args.concat([filePath]))],

tools/build_linux_release.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
# SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
4+
# SPDX-FileCopyrightText: TNG Technology Consulting GmbH<https://www.tngtech.com>
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
set -e
9+
10+
electron-builder --linux --x64 --publish never
11+
mkdir -p release/linux
12+
mv 'release/opossum-ui_0.1.0_amd64.snap' 'release/linux/OpossumUI-for-linux.snap'
13+
mv 'release/OpossumUI-0.1.0.AppImage' 'release/linux/OpossumUI-for-linux.AppImage'

0 commit comments

Comments
 (0)