From 0539b627c133dcd2b7c71feb47fd05d1e50c0a1b Mon Sep 17 00:00:00 2001 From: Emanuele Ciurleo Date: Tue, 19 Dec 2023 19:47:10 -0300 Subject: [PATCH] Added ln check for snap (#2357) * Added ln check for snap Realised that if you manually created (or already had) a ln it would cause the build to fail. So added in a check to see if it exists. Moved commands out of prime-override as it didnt really add anything and made it harder to read * Version no. update to 0.29.1 The snap package was being built with 0.29.1 but is presenting as 0.27 still (locally and in ubuntu snap store) --- .gitignore | 3 ++- snap/snapcraft.yaml | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 0fc4383608..953aa0a45f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ faas .settings/* demos /code -kind \ No newline at end of file +kind +*.snap diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index ea3ce095b4..f6da346138 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,6 +1,6 @@ name: k9s -base: core20 -version: 'v0.27.4' +base: core20 +version: 'v0.29.1' summary: K9s is a CLI to view and manage your Kubernetes clusters. description: | K9s is a CLI to view and manage your Kubernetes clusters. By leveraging a terminal UI, you can easily traverse Kubernetes resources and view the state of your clusters in a single powerful session. @@ -38,11 +38,9 @@ parts: make test make build install $SNAPCRAFT_PART_BUILD/execs/k9s -D $SNAPCRAFT_PART_INSTALL/bin/k9s - override-prime: | mkdir -p $SNAPCRAFT_PART_INSTALL/bin - ln -s $SNAPCRAFT_PART_INSTALL/bin/k9s $SNAPCRAFT_PART_INSTALL/bin/k9s + if [ ! -e $SNAPCRAFT_PART_INSTALL/bin/k9s ]; then + ln -s $SNAPCRAFT_PART_INSTALL/bin/k9s $SNAPCRAFT_PART_INSTALL/bin/k9s + fi build-packages: - build-essential - -prime: - - $build/bin/k9s