diff --git a/.build-trigger.txt b/.build-trigger.txt deleted file mode 100644 index bfaba53..0000000 --- a/.build-trigger.txt +++ /dev/null @@ -1,29 +0,0 @@ -2018-07-16-09:48:50 -2018-08-07-09:01:15 -2018-08-16-11:10:44 -2018-08-31-08:12:32 -2018-09-17-08:13:59 -2018-09-17-10:19:50 -2018-09-20-06:54:24 -2018-09-20-10:23:19 -2018-09-21-06:44:42 -2018-10-09-07:39:29 -2018-12-11-08:54:43 -2019-01-14-10:24:14 -2019-01-23-09:44:51 -2019-02-02-10:09:08 -2019-02-28-09:26:47 -2019-05-31-08:19:05 -2019-06-12-17:44:12 -2019-06-20-08:37:04 -2019-08-21-22:57:22 -2019-09-13-08:49:17 -2019-10-01-07:52:49 -2019-10-10-07:48:40 -2019-10-22-08:26:58 -2019-11-16-11:45:05 -2019-11-28-09:15:10 -2019-12-03-09:16:34 -2020-08-28-09:47:14 -2020-11-13-00:10:54 -2020-12-04-09:41:34 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..169e893 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every month + interval: "monthly" diff --git a/.github/workflows/promote-to-stable.yml b/.github/workflows/promote-to-stable.yml new file mode 100644 index 0000000..f38b063 --- /dev/null +++ b/.github/workflows/promote-to-stable.yml @@ -0,0 +1,25 @@ +name: Promote + +on: + issue_comment: + types: + - created + +permissions: + issues: write + +jobs: + promote: + name: โฌ†๏ธ Promote to stable + environment: "Candidate Branch" + runs-on: ubuntu-latest + if: | + ( !github.event.issue.pull_request ) + && contains(github.event.comment.body, '/promote ') + && contains(github.event.*.labels.*.name, 'testing') + steps: + - name: โฌ†๏ธ Promote to stable + uses: snapcrafters/ci/promote-to-stable@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + store-token: ${{ secrets.SNAP_STORE_STABLE }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..3fede67 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,17 @@ +name: Pull Request + +on: + pull_request: + branches: [ "**" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: ๐Ÿงช Build snap on amd64 + runs-on: ubuntu-latest + steps: + - name: ๐Ÿงช Build snap on amd64 + uses: snapcrafters/ci/test-snap-build@main diff --git a/.github/workflows/release-to-candidate.yaml b/.github/workflows/release-to-candidate.yaml new file mode 100644 index 0000000..3aaba36 --- /dev/null +++ b/.github/workflows/release-to-candidate.yaml @@ -0,0 +1,71 @@ +name: Release + +on: + # Run the workflow each time new commits are pushed to the candidate branch. + push: + branches: [ "candidate" ] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + issues: write + +jobs: + get-architectures: + name: ๐Ÿ–ฅ Get snap architectures + runs-on: ubuntu-latest + outputs: + architectures: ${{ steps.get-architectures.outputs.architectures }} + architectures-list: ${{ steps.get-architectures.outputs.architectures-list }} + steps: + - name: ๐Ÿ–ฅ Get snap architectures + id: get-architectures + uses: snapcrafters/ci/get-architectures@main + + release: + name: ๐Ÿšข Release to latest/candidate + needs: get-architectures + runs-on: ubuntu-latest + environment: "Candidate Branch" + strategy: + matrix: + architecture: ${{ fromJSON(needs.get-architectures.outputs.architectures-list) }} + steps: + - name: ๐Ÿšข Release to latest/candidate + uses: snapcrafters/ci/release-to-candidate@main + with: + architecture: ${{ matrix.architecture }} + launchpad-token: ${{ secrets.LP_BUILD_SECRET }} + store-token: ${{ secrets.SNAP_STORE_CANDIDATE }} + + call-for-testing: + name: ๐Ÿ“ฃ Create call for testing + needs: [release, get-architectures] + environment: "Candidate Branch" + runs-on: ubuntu-latest + outputs: + issue-number: ${{ steps.issue.outputs.issue-number }} + steps: + - name: ๐Ÿ“ฃ Create call for testing + id: issue + uses: snapcrafters/ci/call-for-testing@main + with: + architectures: ${{ needs.get-architectures.outputs.architectures }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + screenshots: + name: ๐Ÿ“ธ Gather screenshots + needs: call-for-testing + environment: "Candidate Branch" + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ“ธ Gather screenshots + uses: snapcrafters/ci/get-screenshots@main + with: + issue-number: ${{ needs.call-for-testing.outputs.issue-number }} + github-token: ${{ secrets.GITHUB_TOKEN }} + screenshots-token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }} diff --git a/.github/workflows/sync-version-with-upstream.yml b/.github/workflows/sync-version-with-upstream.yml new file mode 100644 index 0000000..a9c5e6b --- /dev/null +++ b/.github/workflows/sync-version-with-upstream.yml @@ -0,0 +1,28 @@ +name: Update + +on: + # Runs at 10:00 UTC every day + schedule: + - cron: '0 10 * * *' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + sync: + name: ๐Ÿ”„ Sync version with upstream + environment: "Candidate Branch" + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ”„ Sync version with upstream + uses: snapcrafters/ci/sync-version@main + with: + token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }} + update-script: | + VERSION=$(curl -sL https://api.github.com/repos/mattermost/desktop/releases | + jq . | grep tag_name | grep -v beta | grep -v rc | head -n 1 | cut -d'"' -f4 | tr -d 'v' + ) + sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml diff --git a/.github/workflows/test-snap-can-build.yml b/.github/workflows/test-snap-can-build.yml deleted file mode 100644 index 88650dd..0000000 --- a/.github/workflows/test-snap-can-build.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: ๐Ÿงช Test snap can be built on x86_64 - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - uses: snapcore/action-build@v1 - id: build - - - uses: diddlesnaps/snapcraft-review-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - isClassic: 'false' - # Plugs and Slots declarations to override default denial (requires store assertion to publish) - # plugs: ./plug-declaration.json - # slots: ./slot-declaration.json diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 29ce629..0000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: bash -dist: xenial - -env: - global: - - LC_ALL: C.UTF-8 - - LANG: C.UTF-8 - - SNAPCRAFT_ENABLE_SILENT_REPORT: y - - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y - -addons: - snaps: - - name: snapcraft - channel: candidate - classic: true - - name: http - - name: transfer - - name: lxd - channel: stable - -script: - - sudo apt update - - sudo /snap/bin/lxd.migrate -yes - - sudo /snap/bin/lxd waitready - - sudo /snap/bin/lxd init --auto - - mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache" - - sudo snapcraft --use-lxd -after_success: - - cp *.snap "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap" - - timeout 180 /snap/bin/transfer "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap" -after_failure: - - sudo journalctl -u snapd - - http https://api.snapcraft.io/v2/snaps/info/core architecture==amd64 Snap-Device-Series:16 diff --git a/launcher/launcher b/launcher/launcher new file mode 100755 index 0000000..4ef4d7c --- /dev/null +++ b/launcher/launcher @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ ! -n "$DISABLE_WAYLAND" && -n "$WAYLAND_DISPLAY" ]]; then + WAYLAND_OPTS="--enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform=wayland --disable-features=WaylandFractionalScaleV1" +fi + +exec "$SNAP/opt/Mattermost/mattermost-desktop" --no-sandbox --disable-seccomp-filter-sandbox $WAYLAND_OPTS "$@" diff --git a/mattermost-desktop.png b/mattermost-desktop.png deleted file mode 100644 index 8fd23c9..0000000 Binary files a/mattermost-desktop.png and /dev/null differ diff --git a/snap/gui/mattermost-desktop.png b/snap/gui/mattermost-desktop.png new file mode 100644 index 0000000..db6bf72 Binary files /dev/null and b/snap/gui/mattermost-desktop.png differ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index d9063e7..2b3889a 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,7 +1,9 @@ name: mattermost-desktop -version: 5.3.1 +title: Mattermost Desktop +license: MIT +version: 5.6.0 base: core22 -summary: Open source, private cloud Slack-alternative +summary: A secure, flexible platform build for the new era of collaboration description: | Mattermost is secure workplace messaging from behind your firewall. @@ -9,23 +11,38 @@ description: | - Easily share and view image files - Connect in-house systems with webhooks and Slack-compatible integrations + For technical and operations teams who execute high-stakes, collaborative workflows, + Mattermost provides integrated team messaging, audio and screen share, workflow automation + and project management. Governments, banks and tech giants use our secure collaboration platform + to reduce risk and error rates while accelerating technical productivity. + To use this app, you need a URL for a Mattermost server. + This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or + officially maintained by the upstream developers. +website: https://mattermost.com/ +contact: https://github.com/snapcrafters/mattermost-desktop/issues +issues: https://github.com/snapcrafters/mattermost-desktop/issues +source-code: https://github.com//snapcrafters/mattermost-desktop +icon: snap/gui/mattermost-desktop.png + grade: stable confinement: strict compression: lzo architectures: - - build-on: amd64 + - amd64 + - arm64 parts: - bsi-trigger: # A non-built part, only used to trigger builds in build.snapcraft.io on upstream changes - plugin: nil - source: https://github.com/mattermost/desktop.git - + launcher: + plugin: dump + source: launcher + override-build: | + cp launcher $CRAFT_PART_INSTALL/ mattermost-desktop: plugin: dump - source: https://releases.mattermost.com/desktop/$SNAPCRAFT_PROJECT_VERSION/mattermost-desktop_$SNAPCRAFT_PROJECT_VERSION-1_amd64.deb + source: https://releases.mattermost.com/desktop/$SNAPCRAFT_PROJECT_VERSION/mattermost-desktop_$SNAPCRAFT_PROJECT_VERSION-1_$SNAPCRAFT_TARGET_ARCH.deb source-type: deb build-packages: [wget, ca-certificates] override-build: | @@ -55,7 +72,7 @@ apps: mattermost-desktop: extensions: [gnome] command-chain: [opt/Mattermost/fix-default-download-dir] - command: opt/Mattermost/mattermost-desktop --no-sandbox --disable-seccomp-filter-sandbox + command: launcher desktop: usr/share/applications/mattermost-desktop.desktop autostart: mattermost-desktop.desktop environment: