← Back to team overview

data-platform team mailing list archive

[Merge] ~jsimpso/prometheus-snap:master into prometheus-snap:master

 

You have been requested to review the proposed merge of ~jsimpso/prometheus-snap:master into prometheus-snap:master.

For more details, see:
https://code.launchpad.net/~jsimpso/prometheus-snap/+git/prometheus-snap/+merge/453192



-- 
Your team prometheus-snap-developers is requested to review the proposed merge of ~jsimpso/prometheus-snap:master into prometheus-snap:master.
diff --git a/snapcraft.yaml b/snapcraft.yaml
index d73853f..635b504 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,6 +1,6 @@
 name: prometheus
 adopt-info: prometheus
-base: core20
+base: core22
 grade: stable
 summary: The Prometheus monitoring system and time series database
 description: |
@@ -43,21 +43,21 @@ parts:
   prometheus:
     plugin: go
     override-pull: |
-      snapcraftctl pull
-      HIGHEST_RELEASE=$(git -C "${SNAPCRAFT_PART_SRC}" tag --list | grep '^v2\.[0-9]*\.[0-9]*$' | sort -Vr | head -1)
-      snapcraftctl set-version "$( echo ${HIGHEST_RELEASE} | sed -e 's/^v//')"
-      git -C "${SNAPCRAFT_PART_SRC}" reset --hard refs/tags/"${HIGHEST_RELEASE}"
+      craftctl default
+      HIGHEST_RELEASE=$(git -C "${CRAFT_PART_SRC}" tag --list | grep '^v2\.[0-9]*\.[0-9]*$' | sort -Vr | head -1)
+      craftctl set version="$( echo ${HIGHEST_RELEASE} | sed -e 's/^v//')"
+      git -C "${CRAFT_PART_SRC}" reset --hard refs/tags/"${HIGHEST_RELEASE}"
     source: https://github.com/prometheus/prometheus.git
     build-packages: [build-essential, curl, jq, make]
-    build-snaps: [node/16/stable]
+    build-snaps: [node/16/stable, go/latest/stable]
     override-build: |
       make build
       make common-test-short
-      mkdir -p "$SNAPCRAFT_PART_INSTALL/bin"
-      mkdir -p "$SNAPCRAFT_PART_INSTALL/etc/prometheus"
-      cp -p "$SNAPCRAFT_PART_BUILD/promtool" "$SNAPCRAFT_PART_INSTALL/bin/"
-      cp -p "$SNAPCRAFT_PART_BUILD/prometheus" "$SNAPCRAFT_PART_INSTALL/bin/"
-      cp -p "$SNAPCRAFT_PART_SRC/documentation/examples/prometheus.yml" "$SNAPCRAFT_PART_INSTALL/etc/prometheus/prometheus.yml.example"
+      mkdir -p "$CRAFT_PART_INSTALL/bin"
+      mkdir -p "$CRAFT_PART_INSTALL/etc/prometheus"
+      cp -p "$CRAFT_PART_BUILD/promtool" "$CRAFT_PART_INSTALL/bin/"
+      cp -p "$CRAFT_PART_BUILD/prometheus" "$CRAFT_PART_INSTALL/bin/"
+      cp -p "$CRAFT_PART_SRC/documentation/examples/prometheus.yml" "$CRAFT_PART_INSTALL/etc/prometheus/prometheus.yml.example"
     # util-linux required to drop privileges
     # https://snapcraft.io/docs/system-usernames
     stage-packages: [util-linux]

References