上传编译工具
This commit is contained in:
parent
14ec1db85d
commit
4a0729edb1
35
.gitignore
vendored
35
.gitignore
vendored
@ -1,23 +1,14 @@
|
||||
.DS_Store
|
||||
# ---> Go
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
*.log
|
||||
pb
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
12
pb_2.7.py
12
pb_2.7.py
@ -14,12 +14,18 @@ if os.path.exists(source_path):
|
||||
# dirs 是一个 list,内容是该文件夹中所有的目录的名字(不包括子目录)
|
||||
# files 同样是 list, 内容是该文件夹中所有的文件(不包括子目录)
|
||||
for root, dirs, files in os.walk(source_path):
|
||||
if not "google" in root:
|
||||
relative_path = root.split(source_path)[-1].strip("/")
|
||||
if len(relative_path) == 0:
|
||||
for file in files:
|
||||
folder = os.path.basename(root)
|
||||
if folder == "proto":
|
||||
folder = os.path.splitext(file)[1]
|
||||
if folder == ".proto":
|
||||
src_file = os.path.join(root, file)
|
||||
shutil.copy(src_file, target_path)
|
||||
elif folder != "protobuf":
|
||||
else:
|
||||
for file in files:
|
||||
folder = os.path.splitext(file)[1]
|
||||
if folder == ".proto":
|
||||
src_file = os.path.join(root, file)
|
||||
out_file = os.path.join(target_path, file)
|
||||
file_data = ""
|
||||
|
Loading…
Reference in New Issue
Block a user