From bfd8d45cc7954cfaf74be2198e49557258cd39e9 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 25 Jun 2018 10:06:08 -0300 Subject: [PATCH] docs: split linux-packages.md into nfpm.md and snapcraft.md --- www/content/{linux-packages.md => nfpm.md} | 105 +-------------------- www/content/snapcraft.md | 101 ++++++++++++++++++++ 2 files changed, 102 insertions(+), 104 deletions(-) rename www/content/{linux-packages.md => nfpm.md} (52%) create mode 100644 www/content/snapcraft.md diff --git a/www/content/linux-packages.md b/www/content/nfpm.md similarity index 52% rename from www/content/linux-packages.md rename to www/content/nfpm.md index 597bf9d2e..0023c3c3a 100644 --- a/www/content/linux-packages.md +++ b/www/content/nfpm.md @@ -1,16 +1,10 @@ --- -title: Linux Packages +title: NFPM series: customization hideFromIndex: true weight: 80 --- -GoReleaser can generate RPM, Deb and Snap packages for your projects. - -Let's see each option in detail: - -## NFPM - GoReleaser can be wired to [nfpm](https://github.com/goreleaser/nfpm) to generate and publish `.deb` and `.rpm` packages. @@ -150,100 +144,3 @@ nfpm: Note that GoReleaser will not install `rpmbuild` or any dependencies for you. As for now, `rpmbuild` is recommended if you want to generate rpm packages. You can install it with `apt-get install rpm` or `brew install rpm`. - -## Snapcraft - -GoReleaser can also generate `snap` packages. -[Snaps](http://snapcraft.io/) are a new packaging format, that will let you -publish your project directly to the 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. - -You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/). - -Available options: - -```yml -# .goreleaser.yml -snapcraft: - # You can change the name of the package. - # This is parsed with the Go template engine and the following variables - # are available: - # - ProjectName - # - Tag - # - Version (Git tag without `v` prefix) - # - Os - # - Arch - # - Arm (ARM version) - # - Env (environment variables) - # Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}` - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - - # Replacements for GOOS and GOARCH in the package name. - # Keys should be valid GOOSs or GOARCHs. - # Values are the respective replacements. - # Default is empty. - replacements: - amd64: 64-bit - 386: 32-bit - darwin: macOS - linux: Tux - - # The name of the snap. This is optional. - # Default is project name. - 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 - 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 - 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. - drumroll: - - # If your app requires extra permissions to work outside of its default - # confined space, declare 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 - - # If you any to pass args to your binary, you can add them with the - # args option. - args: --foo -``` - -Note that GoReleaser will not install `snapcraft` nor any of its dependencies -for you. diff --git a/www/content/snapcraft.md b/www/content/snapcraft.md new file mode 100644 index 000000000..4c005401a --- /dev/null +++ b/www/content/snapcraft.md @@ -0,0 +1,101 @@ +--- +title: Snapcraft +series: customization +hideFromIndex: true +weight: 81 +--- + +GoReleaser can also generate `snap` packages. +[Snaps](http://snapcraft.io/) are a new packaging format, that will let you +publish your project directly to the 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. + +You can read more about it in the [snapcraft docs](https://snapcraft.io/docs/). + +Available options: + +```yml +# .goreleaser.yml +snapcraft: + # You can change the name of the package. + # This is parsed with the Go template engine and the following variables + # are available: + # - ProjectName + # - Tag + # - Version (Git tag without `v` prefix) + # - Os + # - Arch + # - Arm (ARM version) + # - Env (environment variables) + # Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}` + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + + # Replacements for GOOS and GOARCH in the package name. + # Keys should be valid GOOSs or GOARCHs. + # Values are the respective replacements. + # Default is empty. + replacements: + amd64: 64-bit + 386: 32-bit + darwin: macOS + linux: Tux + + # The name of the snap. This is optional. + # Default is project name. + 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 + 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 + 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. + drumroll: + + # If your app requires extra permissions to work outside of its default + # confined space, declare 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 + + # If you any to pass args to your binary, you can add them with the + # args option. + args: --foo +``` + +Note that GoReleaser will not install `snapcraft` nor any of its dependencies +for you.