mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-24 13:06:51 -04:00
16 lines
371 B
Bash
Executable File
16 lines
371 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
|
|
# Use environment variable VERSION if set, otherwise use default
|
|
VERSION=${VERSION:-v0.0.1}
|
|
|
|
# Detect OS and architecture
|
|
OS="${OS:-$(uname -s | tr '[:upper:]' '[:lower:]')}"
|
|
ARCH="${ARCH:-$(uname -m)}"
|
|
|
|
GOOS=${OS} GOARCH=${ARCH} \
|
|
go build \
|
|
-ldflags "\
|
|
-X 'main.VersionX=${VERSION}' "\
|
|
-o dify-plugin-cli-${OS}-${ARCH} ./cmd/commandline
|