mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
8c514d28ed
## Summary Closes #9922 Requires https://github.com/canonical/snapcraft/pull/6511. _Mostly_ reviewable but I am still doing QA. The GHA pipeline is a proposal. Snap gets released to the `edge` risk on every `main` commit, then any revision can be manually promoted to other risks, including `stable`. ## Testing ``` snapcraft pack -v sudo snap install ./zed...snap --dangerous --classic ``` ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [ ] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [ ] Tests cover the new or changed behavior. Release Notes: - Added an official Snap package for Linux --------- Co-authored-by: Neel <neel@zed.dev>
21 lines
506 B
Bash
Executable File
21 lines
506 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# This script is intended to be run after `snap-build`.
|
|
#
|
|
# It expects the `zed.snap` built by `snap-build` to be in the current
|
|
# directory.
|
|
#
|
|
# This will uninstall the current `zed` snap, replacing it with a snap
|
|
# that directly uses the `snap/unpacked` directory.
|
|
|
|
set -euxo pipefail
|
|
|
|
# Rerun as root
|
|
[ "$UID" -eq 0 ] || exec sudo bash -e "$0" "$@"
|
|
|
|
snap remove zed || true
|
|
mkdir -p snap
|
|
rm -rf snap/unpacked
|
|
unsquashfs -dest snap/unpacked zed.snap
|
|
snap try --classic snap/unpacked
|