From 9caebd26f8bdeb169a5c4be52a051866676d6dde Mon Sep 17 00:00:00 2001 From: Maarten Mulders Date: Fri, 10 Dec 2021 08:38:10 +0100 Subject: [PATCH] build: Ensure correct Snap name (mcs is too short for a Snap name) --- .../distributions/mcs/snap/README.md.tpl | 7 ++ .../mcs/snap/snap/snapcraft.yaml.tpl | 67 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 src/jreleaser/distributions/mcs/snap/README.md.tpl create mode 100644 src/jreleaser/distributions/mcs/snap/snap/snapcraft.yaml.tpl diff --git a/src/jreleaser/distributions/mcs/snap/README.md.tpl b/src/jreleaser/distributions/mcs/snap/README.md.tpl new file mode 100644 index 00000000..4b569da9 --- /dev/null +++ b/src/jreleaser/distributions/mcs/snap/README.md.tpl @@ -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) diff --git a/src/jreleaser/distributions/mcs/snap/snap/snapcraft.yaml.tpl b/src/jreleaser/distributions/mcs/snap/snap/snapcraft.yaml.tpl new file mode 100644 index 00000000..d1c22a7c --- /dev/null +++ b/src/jreleaser/distributions/mcs/snap/snap/snapcraft.yaml.tpl @@ -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