Browse Source

fix file mappings

Darien Raymond 7 years ago
parent
commit
7be96a1629
2 changed files with 9 additions and 0 deletions
  1. 2 0
      release/BUILD
  2. 7 0
      release/mapping.bzl

+ 2 - 0
release/BUILD

@@ -1,6 +1,7 @@
 package(default_visibility=["//visibility:public"])
 package(default_visibility=["//visibility:public"])
 
 
 load("@v2ray_ext//bazel:zip.bzl", "pkg_zip")
 load("@v2ray_ext//bazel:zip.bzl", "pkg_zip")
+load("//release:mapping.bzl", "gen_mappings")
 
 
 filegroup(
 filegroup(
   name = "config_json",
   name = "config_json",
@@ -39,6 +40,7 @@ pkg_zip(
     ":geodata",
     ":geodata",
   ],
   ],
   out = "v2ray-macos-64.zip",
   out = "v2ray-macos-64.zip",
+  mappings = gen_mappings("darwin", "amd64"),
 )
 )
 
 
 pkg_zip(
 pkg_zip(

+ 7 - 0
release/mapping.bzl

@@ -0,0 +1,7 @@
+def gen_mappings(os, arch):
+  return {
+    "v2ray_core/release/doc": "doc",
+    "v2ray_core/release/config": "",
+    "v2ray_core/main/" + os + "/" + arch: "",
+    "v2ray_ext/tools/control/main/" + os + "/" + arch: "",
+  }