feat: refactor to ymsctl & yms-daemon
This commit is contained in:
@@ -71,12 +71,13 @@ sources_dir="$top_dir/SOURCES"
|
||||
temporary_dir="$build_dir/tmp"
|
||||
mkdir -p "$sources_dir" "$top_dir/BUILD" "$top_dir/BUILDROOT" "$top_dir/RPMS" "$top_dir/SRPMS" "$temporary_dir"
|
||||
|
||||
echo "Building static linux/$go_arch yms-daemon"
|
||||
echo "Building static linux/$go_arch ymsd and ymsctl"
|
||||
(
|
||||
cd "$project_dir"
|
||||
GOCACHE="$build_dir/go-cache" CGO_ENABLED=0 GOOS=linux GOARCH="$go_arch" \
|
||||
go build -trimpath -ldflags="-s -w" -o "$sources_dir/yms-daemon" .
|
||||
go build -trimpath -ldflags="-s -w" -o "$sources_dir/ymsd" .
|
||||
)
|
||||
cp "$sources_dir/ymsd" "$sources_dir/ymsctl"
|
||||
|
||||
install -m 0640 "$project_dir/packaging/etc/yms-daemon/yms-daemon.toml" "$sources_dir/yms-daemon.toml"
|
||||
install -m 0644 "$project_dir/packaging/systemd/yms-daemon.service" "$sources_dir/yms-daemon.service"
|
||||
|
||||
Reference in New Issue
Block a user