Skip to content

Commit db21676

Browse files
committed
feat(stacks): add headscale and tailscale
1 parent e17ca6c commit db21676

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,18 @@
458458
"owner": "drycc-addons",
459459
"match": "v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
460460
},
461+
"headscale": {
462+
"name": "headscale",
463+
"type": "github",
464+
"owner": "juanfont",
465+
"match": "v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
466+
},
467+
"tailscale": {
468+
"name": "tailscale",
469+
"type": "github",
470+
"owner": "tailscale",
471+
"match": "v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
472+
},
461473
}
462474

463475

stacks/headscale/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+
curl -fsSL "https://github.com/juanfont/headscale/releases/download/v${STACK_VERSION}/headscale_${STACK_VERSION}_linux_${OS_ARCH}" -o "${BIN_DIR}/${STACK_NAME}"
12+
chmod +x "${BIN_DIR}"/"${STACK_NAME}"
13+
# upx
14+
upx --lzma --best "${BIN_DIR}"/*
15+
}
16+
17+
# call build stack
18+
build-stack "${1}"

stacks/tailscale/build.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
install-stack go "${GO_VERSION}"
12+
. init-stack
13+
git clone -b v${STACK_VERSION} --depth=1 https://github.com/tailscale/tailscale.git
14+
cd tailscale
15+
# fix CVE-2022-28948
16+
export VERSION_LONG=${STACK_VERSION}
17+
export VERSION_SHORT=${STACK_VERSION}
18+
./build_dist.sh tailscale.com/cmd/tailscale
19+
./build_dist.sh tailscale.com/cmd/tailscaled
20+
mv tailscale tailscaled "${BIN_DIR}"
21+
cd ..
22+
rm -rf tailscale
23+
# upx
24+
upx --lzma --best "${BIN_DIR}"/*
25+
}
26+
27+
# call build stack
28+
build-stack "${1}"

0 commit comments

Comments
 (0)