forked from kubepug/kubepug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
41 lines (39 loc) · 1.26 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
40
41
name: kubepug
base: core20
summary: CLI to verify Kubernetes manifests and clusters on deprecated APIs
description: |
Kubepug is a CLI and kubectl plugin, that can verify if a Kubernetes cluster or Kubernetes manifests contains deprecated and deleted APIs.
It can check against a specific Kubernetes version, and depending on the API propose a replacement API
grade: stable
confinement: strict
adopt-info: kubepug
architectures:
- amd64
- arm64
- armhf
apps:
kubepug:
command: bin/kubepug
plugs:
- home
- network
parts:
kubepug:
plugin: go
source-type: git
source: https://github.com/rikatz/kubepug
override-pull: |
snapcraftctl pull
last_committed_tag="$(git describe --tags --abbrev=0)"
last_committed_tag_ver="$(echo ${last_committed_tag} | sed 's/v//')"
last_released_tag="$(snap info kubepug | 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_ver}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
fi
snapcraftctl set-version "$(git describe --tags | sed 's/v//')"
build-packages:
- git
- sed