From 6e26fb58352cd7fbada6ae2af5966ffa2cd6a274 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 3 Oct 2018 22:06:21 +0200 Subject: [PATCH] fix build files --- release/BUILD | 11 ++++++++--- .../{systemd/v2ray.service => systemd_v2ray.service} | 0 release/config/{systemv/v2ray => systemv_v2ray} | 0 release/install-release.sh | 10 ++++++++-- 4 files changed, 16 insertions(+), 5 deletions(-) rename release/config/{systemd/v2ray.service => systemd_v2ray.service} (100%) rename release/config/{systemv/v2ray => systemv_v2ray} (100%) diff --git a/release/BUILD b/release/BUILD index d4fd6783..86b661db 100644 --- a/release/BUILD +++ b/release/BUILD @@ -2,8 +2,7 @@ package(default_visibility=["//visibility:public"]) load("@v2ray_ext//bazel:build.bzl", "foreign_go_binary") load("@v2ray_ext//bazel:zip.bzl", "pkg_zip") - -package(default_visibility=["//visibility:public"]) +load("@v2ray_ext//bazel:gpg.bzl", "gpg_sign") foreign_go_binary( name = "v2ray_linux_amd64", @@ -30,7 +29,7 @@ filegroup( filegroup( name = "systemd", - srcs = ["config/systemd/v2ray.service", "config/systemv/v2ray"], + srcs = ["config/systemd_v2ray.service", "config/systemv_v2ray"], ) filegroup( @@ -38,6 +37,11 @@ filegroup( srcs = glob(["doc/*.md"]), ) +filegroup( + name = "geodata", + srcs = ["config/geoip.dat", "config/geosite.dat"], +) + pkg_zip( name = "v2ray_linux_amd64_package", srcs = [ @@ -48,6 +52,7 @@ pkg_zip( ":config_all", ":systemd", ":doc", + ":geodata", ], out = "v2ray-linux-64.zip", ) diff --git a/release/config/systemd/v2ray.service b/release/config/systemd_v2ray.service similarity index 100% rename from release/config/systemd/v2ray.service rename to release/config/systemd_v2ray.service diff --git a/release/config/systemv/v2ray b/release/config/systemv_v2ray similarity index 100% rename from release/config/systemv/v2ray rename to release/config/systemv_v2ray diff --git a/release/install-release.sh b/release/install-release.sh index bc1446bf..b8957a50 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -269,17 +269,23 @@ installV2Ray(){ installInitScript(){ + if [[ -f "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" ]]; then + cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd_v2ray.service" + fi + if [[ -f "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" ]]; then + cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv_v2ray" + fi if [[ -n "${SYSTEMCTL_CMD}" ]];then if [[ ! -f "/etc/systemd/system/v2ray.service" ]]; then if [[ ! -f "/lib/systemd/system/v2ray.service" ]]; then - cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd/v2ray.service" "/etc/systemd/system/" + cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemd_v2ray.service" "/etc/systemd/system/" systemctl enable v2ray.service fi fi return elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/v2ray" ]]; then installSoftware "daemon" || return $? - cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv/v2ray" "/etc/init.d/v2ray" + cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/systemv_v2ray" "/etc/init.d/v2ray" chmod +x "/etc/init.d/v2ray" update-rc.d v2ray defaults fi