diff --git a/.snapcraft/travis_snapcraft.cfg b/.snapcraft/travis_snapcraft.cfg new file mode 100644 index 0000000000..54456459ed Binary files /dev/null and b/.snapcraft/travis_snapcraft.cfg differ diff --git a/.travis.yml b/.travis.yml index 053f56d4d6..bc41e89540 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,4 +90,18 @@ cache: directories: - node_modules - app/node_modules - - /tmp/mailsync-build-deps \ No newline at end of file + - /tmp/mailsync-build-deps + +after_success: +- openssl aes-256-cbc -K $encrypted_f8421d18d2b7_key -iv $encrypted_f8421d18d2b7_iv + -in .snapcraft/travis_snapcraft.cfg -out .snapcraft/snapcraft.cfg -d + +services: +- docker + +deploy: + 'on': + branch: master + provider: script + script: docker run -v $(pwd):$(pwd) -t snapcore/snapcraft sh -c "apt update -qq && cd $(pwd) && snapcraft && snapcraft push *.snap --release edge" + skip_cleanup: true diff --git a/snap/.snapcraft/state b/snap/.snapcraft/state new file mode 100644 index 0000000000..3497788985 --- /dev/null +++ b/snap/.snapcraft/state @@ -0,0 +1,3 @@ +!GlobalState +assets: + build-packages: [] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml new file mode 100644 index 0000000000..8acd90f40e --- /dev/null +++ b/snap/snapcraft.yaml @@ -0,0 +1,57 @@ +name: mailspring +version: 1.0.1 +summary: The best email app for people and teams at work +description: | + An extensible desktop mail app built on the modern web. + +confinement: strict + +parts: + mailspring: + plugin: dump + source: https://mailspring-builds.s3.amazonaws.com/client/ba1d6734/linux/mailspring-1.0.1-amd64.deb + source-type: deb + # Correct path to icon. + prepare: | + sed -i 's|Icon=mailspring|Icon=/usr/share/pixmaps/mailspring\.png|' usr/share/applications/mailspring.desktop + after: + - desktop-gtk2 + stage-packages: + - gir1.2-gnomekeyring-1.0 + - libasound2 + - libcurl3 + - libgconf2-4 + - libgcrypt20 + - libgnome-keyring0 + - libnotify4 + - libnspr4 + - libnss3 + - libpulse0 + - libxkbfile1 + - libxss1 + - libxtst6 + - python + +apps: + mailspring: + command: desktop-launch $SNAP/usr/share/mailspring/mailspring + desktop: usr/share/applications/mailspring.desktop + # Correct the TMPDIR path for Chromium Framework/Electron to + # ensure libappindicator has readable resources. + environment: + TMPDIR: $XDG_RUNTIME_DIR + plugs: + - avahi-observe + - browser-support + - cups-control + - gsettings + - home + - mount-observe + - network + - network-control + - password-manager-service + - pulseaudio + - removable-media + - screen-inhibit-control + - unity7 + - x11