-
Notifications
You must be signed in to change notification settings - Fork 4
/
snapcraft.yaml
39 lines (35 loc) · 1.05 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: mdl
summary: Markdown lint tool
description: |
A tool to check markdown files and flag style issues.
Usage: mdl file or cat file | mdl
grade: stable
confinement: strict
adopt-info: mdl
base: core18
apps:
mdl:
command: bin/mdl
plugs: [home, removable-media]
environment:
LANG: C.UTF-8
parts:
mdl:
source: https://github.com/markdownlint/markdownlint.git
plugin: ruby
ruby-version: '3.0.2'
override-pull: |
snapcraftctl pull
last_committed_tag="$(git describe --tags --abbrev=0)"
last_released_tag="$(snap info mdl | awk '$1 == "latest/beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
fi
snapcraftctl set-version "$(git describe --tags | tr -d 'v')"
override-build: |
snapcraftctl build
gem build mdl.gemspec
gem install mdl-*.gem --env-shebang