Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
7703fa6c
Commit
7703fa6c
authored
Mar 15, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7b9da4f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
backend/controller/build_logs_manager.py
backend/controller/build_logs_manager.py
+9
-3
backend/controller/download_manager.py
backend/controller/download_manager.py
+5
-1
backend/view/download.py
backend/view/download.py
+1
-1
No files found.
backend/controller/build_logs_manager.py
View file @
7703fa6c
...
...
@@ -2,6 +2,7 @@
# -*- coding: utf_8 -*-
import
os
import
re
import
copy
import
time
import
types
...
...
@@ -57,9 +58,14 @@ class BuildLogsManager(object):
app_files
=
[]
for
sf
in
source_files
:
parsed_result
=
urlparse
(
sf
.
path
)
target_file
=
os
.
sep
.
join
([
config
.
get
(
"UPLOAD_PATH"
),
parsed_result
.
path
.
replace
(
'
\\
'
,
'/'
)])
shutil
.
move
(
os
.
path
.
normpath
(
target_file
),
os
.
path
.
normpath
(
dest_dir
))
app_files
.
append
([
sf
.
id
,
os
.
sep
.
join
([
dest_dir
,
os
.
path
.
basename
(
parsed_result
.
path
)])])
target_file
=
os
.
sep
.
join
([
config
.
get
(
"UPLOAD_PATH"
),
parsed_result
.
path
.
replace
(
'
\\
'
,
' / '
)])
filename
=
os
.
path
.
basename
(
target_file
)
name
,
suffix
=
os
.
path
.
splitext
(
filename
)
name
=
re
.
sub
(
r"_\d{14}$"
,
""
,
name
)
dst_file
=
os
.
path
.
normpath
(
os
.
sep
.
join
([
dest_dir
,
name
+
suffix
]))
shutil
.
move
(
os
.
path
.
normpath
(
target_file
),
dst_file
)
app_files
.
append
([
sf
.
id
,
dst_file
])
# if os.path.exists(target_file):
# shutil.move(target_file, dest_dir)
# app_files.append([sf.id, os.sep.join([dest_dir, os.path.basename(parsed_result.path)])])
...
...
backend/controller/download_manager.py
View file @
7703fa6c
...
...
@@ -2,6 +2,7 @@
# -*- coding: utf_8 -*-
import
os
import
re
import
copy
import
time
import
types
...
...
@@ -146,7 +147,10 @@ class DownloadManager(object):
if
not
os
.
path
.
exists
(
tf
):
return
False
,
"{} not found"
.
format
(
tf
)
shutil
.
copy
(
tf
,
build_source_path
)
filename
=
os
.
path
.
basename
(
tf
)
name
,
suffix
=
os
.
path
.
splitext
(
filename
)
name
=
re
.
sub
(
r"_\d{14}$"
,
""
,
name
)
shutil
.
copy
(
tf
,
os
.
sep
.
join
([
build_source_path
,
name
+
suffix
]))
if
len
(
temp
)
%
4
==
0
and
temp
:
result_json
.
append
(
copy
.
deepcopy
(
temp
))
...
...
backend/view/download.py
View file @
7703fa6c
...
...
@@ -62,7 +62,7 @@ def get():
# 读取epk文件,按照格式返回相应结构体数据
ret
=
""
if
os
.
path
.
exists
(
result
):
with
open
(
result
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
result
,
"r"
)
as
f
:
ret
=
f
.
read
()
return
ret
except
Exception
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment