Skip to content

Commit

Permalink
build: Ensure correct Snap name
Browse files Browse the repository at this point in the history
(mcs is too short for a Snap name)
  • Loading branch information
mthmulders committed Dec 10, 2021
1 parent 2b3d9ba commit 9caebd2
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/jreleaser/distributions/mcs/snap/README.md.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Snap repo for MCS

[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/maven-central-search)

Snap configuration for {{projectNameCapitalized}}

Builds with [https://snapcraft.io/{{distributionName}}/builds](https://snapcraft.io/{{distributionName}}/builds)
67 changes: 67 additions & 0 deletions src/jreleaser/distributions/mcs/snap/snap/snapcraft.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: maven-central-search
version: {{projectVersion}}
summary: {{projectDescription}}
description: {{projectLongDescription}}

grade: {{snapGrade}}
confinement: {{snapConfinement}}
base: {{snapBase}}
type: app

apps:
{{distributionExecutable}}:
command: $SNAP/bin/{{distributionExecutable}}
{{#snapHasLocalPlugs}}
plugs:
{{#snapLocalPlugs}}
- {{.}}
{{/snapLocalPlugs}}
{{/snapHasLocalPlugs}}
{{#snapHasLocalSlots}}
slots:
{{#snapLocalSlots}}
- {{.}}
{{/snapLocalSlots}}
{{/snapHasLocalSlots}}

{{#snapHasPlugs}}
plugs:
{{#snapPlugs}}
{{name}}:
{{#attributes}}
{{key}}: {{value}}
{{/attributes}}
{{/snapPlugs}}
{{/snapHasPlugs}}
{{#snapHasSlots}}
slots:
{{#snapSlots}}
{{name}}:
{{#attributes}}
{{key}}: {{value}}
{{/attributes}}
{{#hasReads}}
reads:
{{#reads}}
- {{.}}
{{/reads}}
{{/hasReads}}
{{#hasWrites}}
writes:
{{#writes}}
- {{.}}
{{/writes}}
{{/hasWrites}}
{{/snapSlots }}
{{/snapHasSlots}}
parts:
{{distributionExecutable}}:
plugin: dump
source: {{distributionUrl}}
source-checksum: sha256/{{distributionChecksumSha256}}
stage-packages:
- curl

architectures:
- build-on: amd64
run-on: amd64

0 comments on commit 9caebd2

Please sign in to comment.