We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a95853 commit 276a045Copy full SHA for 276a045
1 file changed
stacks/grafana/build.sh
@@ -6,9 +6,13 @@
6
# Implement build function
7
function build() {
8
generate-stack-path
9
- curl -fsSL -o tmp.tar.gz https://dl.grafana.com/oss/release/grafana-${STACK_VERSION}.linux-${OS_ARCH}.tar.gz
+ install-stack jq 1.7.1 && . init-stack
10
+ url=$(curl -s "https://grafana.com/api/grafana/versions/${STACK_VERSION}" | \
11
+ jq -r ".packages[] | select(.os == \"linux\" and (.arch == \"${OS_ARCH}\") and (.url | endswith(\".tar.gz\"))) | .url")
12
+ echo "Downloading Grafana..."
13
+ curl -fSL -o tmp.tar.gz "$url"
14
tar -xzf tmp.tar.gz
- cp -rf grafana-v${STACK_VERSION}/* ${DATA_DIR}
15
+ cp -rf grafana-${STACK_VERSION}/* ${DATA_DIR}
16
rm -rf tmp.tar.gz grafana-${STACK_VERSION}
17
}
18
0 commit comments