Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-project
Commits
0018bdfd
Commit
0018bdfd
authored
4 years ago
by
Yang Wang
Browse files
Options
Downloads
Patches
Plain Diff
misc: exit when build script command fails
Change-Id: I70f8a48bd774978480a4f6828aa70ac932082c49
parent
5ec47bc3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/build-windows.py
+13
-28
13 additions, 28 deletions
scripts/build-windows.py
with
13 additions
and
28 deletions
scripts/build-windows.py
+
13
−
28
View file @
0018bdfd
...
...
@@ -9,36 +9,31 @@ this_dir = os.path.dirname(os.path.realpath(__file__))
def
execute_cmd
(
cmd
,
with_shell
=
False
):
p
=
subprocess
.
Popen
(
cmd
,
shell
=
with_shell
)
_
,
_
=
p
.
communicate
()
if
p
.
returncode
!=
0
:
sys
.
exit
(
1
)
return
p
.
returncode
def
build_daemon
(
parsed_args
):
make_cmd
=
os
.
path
.
dirname
(
this_dir
)
+
'
\\
daemon
\\
compat
\\
msvc
\\
winmake.py
'
os
.
chdir
(
os
.
path
.
dirname
(
this_dir
)
+
'
\\
daemon
\\
compat
\\
msvc
'
)
status_code
=
execute_cmd
(
'
python
'
+
make_cmd
+
'
-iv -t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-b daemon
'
)
execute_cmd
(
'
python
'
+
make_cmd
+
'
-iv -t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-b daemon
'
)
os
.
chdir
(
os
.
path
.
dirname
(
this_dir
))
return
status_code
def
build_lrc
(
parsed_args
):
make_cmd
=
os
.
path
.
dirname
(
this_dir
)
+
'
\\
lrc
\\
make-lrc.py
'
return
execute_cmd
(
'
python
'
+
make_cmd
+
'
-gb
'
+
'
-t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-q
'
+
parsed_args
.
qtver
)
execute_cmd
(
'
python
'
+
make_cmd
+
'
-gb
'
+
'
-t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-q
'
+
parsed_args
.
qtver
)
def
build_client
(
parsed_args
):
os
.
chdir
(
'
./client-qt
'
)
ret
=
0
ret
&=
not
execute_cmd
(
'
pandoc -f markdown -t html5 -o changelog.html changelog.md
'
,
True
)
ret
&=
not
execute_cmd
(
'
python make-client.py -d
'
)
ret
&=
not
execute_cmd
(
'
python make-client.py -b
'
+
'
-t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-q
'
+
parsed_args
.
qtver
)
if
not
os
.
path
.
exists
(
'
./x64/Release/qt.conf
'
):
ret
&=
not
execute_cmd
(
'
powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1
'
+
'
"
Release
"
'
+
'"'
+
parsed_args
.
qtver
+
'"'
,
True
)
return
ret
execute_cmd
(
'
pandoc -f markdown -t html5 -o changelog.html changelog.md
'
,
True
)
execute_cmd
(
'
python make-client.py -d
'
)
execute_cmd
(
'
python make-client.py -b
'
+
'
-t
'
+
parsed_args
.
toolset
+
'
-s
'
+
parsed_args
.
sdk
+
'
-q
'
+
parsed_args
.
qtver
)
execute_cmd
(
'
powershell -ExecutionPolicy Unrestricted -File copy-runtime-files.ps1
'
+
'
"
Release
"
'
+
'"'
+
parsed_args
.
qtver
+
'"'
,
True
)
def
parse_args
():
...
...
@@ -57,20 +52,10 @@ def parse_args():
def
main
():
parsed_args
=
parse_args
()
if
build_daemon
(
parsed_args
)
!=
0
:
print
(
'
daemon build failure!
'
)
sys
.
exit
(
1
)
if
build_lrc
(
parsed_args
)
!=
0
:
print
(
'
lrc build failure!
'
)
sys
.
exit
(
1
)
if
build_client
(
parsed_args
)
!=
0
:
print
(
'
client build failure!
'
)
sys
.
exit
(
1
)
build_daemon
(
parsed_args
)
build_lrc
(
parsed_args
)
build_client
(
parsed_args
)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment