Skip to content

Commit 3a4f5a9

Browse files
committed
feat(stacks): add yq
1 parent 2d54db5 commit 3a4f5a9

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@
241241
"owner": "sclevine",
242242
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
243243
},
244+
"yq": {
245+
"name": "yq",
246+
"type": "github",
247+
"owner": "mikefarah",
248+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
249+
},
244250
"juicefs": {
245251
"name": "juicefs",
246252
"type": "github",

stacks/yq/build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
BIN_DIR="${DATA_DIR}"/bin
10+
mkdir -p "${BIN_DIR}"
11+
architecture=$(dpkg --print-architecture)
12+
curl -o "${BIN_DIR}"/yq \
13+
-L "https://github.com/mikefarah/yq/releases/download/v${STACK_VERSION}/yq_linux_$architecture"; \
14+
chmod +x "${BIN_DIR}"/yq
15+
}
16+
17+
# call build stack
18+
build-stack "${1}"

0 commit comments

Comments
 (0)