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

feat: add Fiddle snap package #1348

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,16 @@ jobs:
type: enum
enum: [ 'x64', 'arm64','armv7l' ]
docker:
- image: cimg/base:stable
- image: ubuntudesktop/gnome-3-38-2004
VerteDinde marked this conversation as resolved.
Show resolved Hide resolved
steps:
- run: sudo apt-get update && sudo apt install rpm
- run: sudo apt-get -y update
- run: sudo apt-get install -y git curl dpkg fakeroot rpm lsb-release
- install
- run: cp ./.circleci/snapcraft-wrapper /snap/bin/snapcraft
- run:
command: |
echo 'export PATH=/snap/bin:"$PATH"' >> "$BASH_ENV"
source "$BASH_ENV"
- run: npx yarn run publish --arch=<< parameters.arch >> --dry-run
# CircleCI doesn't let you persist files with the same name from multiple
# jobs, so only persist the .webpack path from the x64 linux-build job
Expand Down
13 changes: 13 additions & 0 deletions .circleci/snapcraft-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

VerteDinde marked this conversation as resolved.
Show resolved Hide resolved
SNAP="/snap/snapcraft/current"
SNAP_NAME="$(awk '/^name:/{print $2}' $SNAP/meta/snap.yaml)"
SNAP_VERSION="$(awk '/^version:/{print $2}' $SNAP/meta/snap.yaml)"
SNAP_ARCH="amd64"

export SNAP
export SNAP_NAME
export SNAP_VERSION
export SNAP_ARCH

exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"
10 changes: 10 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ const config = {
platforms: ['linux'],
config: commonLinuxConfig,
},
{
name: '@electron-forge/maker-snap',
platforms: ['linux'],
config: {
icon: path.resolve(iconDir, 'fiddle.svg'),
features: {
audio: true,
},
},
},
],
publishers: [
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"@electron-forge/cli": "^6.1.1",
"@electron-forge/maker-deb": "^6.1.1",
"@electron-forge/maker-rpm": "^6.1.1",
"@electron-forge/maker-snap": "^6.1.1",
"@electron-forge/maker-squirrel": "^6.1.1",
"@electron-forge/maker-zip": "^6.1.1",
"@electron-forge/plugin-webpack": "^6.1.1",
Expand Down
30 changes: 28 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,16 @@
optionalDependencies:
electron-installer-redhat "^3.2.0"

"@electron-forge/maker-snap@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@electron-forge/maker-snap/-/maker-snap-6.1.1.tgz#1e90cd97ed5d1fdf31511082c743f6cd5506336e"
integrity sha512-ZKRvKt/JZMJvaCJ9MYFz6oRCfI4NwQgJ4MhyXiHLdY0E+cqtcWXRclEHdRFNFZcH6T/3F2yAPwP56iCHeYMDkA==
dependencies:
"@electron-forge/maker-base" "6.1.1"
"@electron-forge/shared-types" "6.1.1"
optionalDependencies:
electron-installer-snap "^5.1.0"

"@electron-forge/maker-squirrel@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@electron-forge/maker-squirrel/-/maker-squirrel-6.1.1.tgz#34bcaf25f3872d8394826ab9237ad2716111eb06"
Expand Down Expand Up @@ -4303,6 +4313,22 @@ electron-installer-redhat@^3.2.0:
word-wrap "^1.2.3"
yargs "^16.0.2"

electron-installer-snap@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/electron-installer-snap/-/electron-installer-snap-5.2.0.tgz#8dd637dc94d4279d790d728b7bdb23fe9415377d"
integrity sha512-SRm7pCpNHMXV545JjScV8fLC9NhFli5r8L8Ju4EHdXwRh76+mwrJoUEDLItixBudZ5Mcgz1SJcDPJfWpEQWX7Q==
dependencies:
"@malept/cross-spawn-promise" "^1.0.0"
debug "^4.3.4"
electron-installer-common "^0.10.2"
fs-extra "^9.0.0"
js-yaml "^3.10.0"
lodash "^4.17.15"
semver "^7.1.1"
tmp-promise "^3.0.2"
which "^2.0.1"
yargs "^16.0.2"

electron-is-dev@^0.3.0:
version "0.3.0"
resolved "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.3.0.tgz"
Expand Down Expand Up @@ -7089,9 +7115,9 @@ jest@^27.5.1:
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-yaml@^3.13.1:
js-yaml@^3.10.0, js-yaml@^3.13.1:
version "3.14.1"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
dependencies:
argparse "^1.0.7"
Expand Down