1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/docs/110-snapcraft.md

70 lines
2.6 KiB
Markdown
Raw Normal View History

2017-09-10 22:07:28 +02:00
---
title: Snapcraft
2017-09-10 22:07:28 +02:00
---
2017-09-11 15:13:14 +02:00
GoReleaser can generate `snap` packages. [Snaps](http://snapcraft.io/) are a
new packaging format, that will let you publish your project directly to the
2017-09-11 15:13:14 +02:00
Ubuntu store. From there it will be installable in all the
[supported Linux distros](https://snapcraft.io/docs/core/install), with
automatic and transactional updates.
2017-09-10 22:07:28 +02:00
You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/).
```yml
# .goreleaser.yml
snapcraft:
# The name of the snap. This is optional.
# Default is project name.
2017-09-10 22:07:28 +02:00
name: drumroll
# Single-line elevator pitch for your amazing snap.
# 79 char long at most.
summary: Software to create fast and easy drum rolls.
# This the description of your snap. You have a paragraph or two to tell the
# most important story about your snap. Keep it under 100 words though,
# we live in tweetspace and your description wants to look good in the snap
# store.
description: |
This is the best drum roll application out there.
Install it and awe!
# A guardrail to prevent you from releasing a snap to all your users before
# it is ready.
# `devel` will let you release only to the `edge` and `beta` channels in the
# store. `stable` will let you release also to the `candidate` and `stable`
# channels. More info about channels here:
# https://snapcraft.io/docs/reference/channels
2017-09-10 22:07:28 +02:00
grade: stable
# Snaps can be setup to follow three different confinement policies:
# `strict`, `devmode` and `classic`. A strict confinement where the snap
# can only read and write in its own namespace is recommended. Extra
# permissions for strict snaps can be declared as `plugs` for the app, which
# are explained later. More info about confinement here:
# https://snapcraft.io/docs/reference/confinement
2017-09-10 22:07:28 +02:00
confinement: strict
# Each binary built by GoReleaser is an app inside the snap. In this section
# you can declare extra details for those binaries. It is optional.
apps:
# The name of the app must be the same name as the binary built.
2017-09-10 22:07:28 +02:00
drumroll:
# If your app requires extra permissions to work outside of its default
# confined space, delcare them here.
# You can read the documentation about the available plugs and the
# things they allow:
# https://snapcraft.io/docs/reference/interfaces).
plugs: ["home", "network"]
# If you want your app to be autostarted and to always run in the
# background, you can make it a simple daemon.
daemon: simple
```
2017-09-11 15:13:14 +02:00
Note that GoReleaser will not install `snapcraft` nor any of its dependencies
for you.