Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
abdullh.alsoleman
Front-End
Commits
338ca571
Commit
338ca571
authored
Aug 27, 2015
by
Ian Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that local build paths exist before doing things that expect them.
parent
f688c11c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
sky_tool
packages/flutter/lib/sky_tool
+29
-4
No files found.
packages/flutter/lib/sky_tool
View file @
338ca571
...
...
@@ -175,7 +175,7 @@ class StartSky(object):
project_or_path
=
os
.
path
.
abspath
(
args
.
project_or_path
)
if
args
.
local_build
:
if
args
.
android_build_available
:
apk_path
=
os
.
path
.
join
(
os
.
path
.
normpath
(
args
.
sky_src_path
),
args
.
android_debug_build_path
,
'apks'
,
APK_NAME
)
else
:
apk_path
=
os
.
path
.
join
(
APK_DIR
,
APK_NAME
)
...
...
@@ -227,12 +227,12 @@ class StartSky(object):
subprocess
.
check_call
([
ADB_PATH
,
'push'
,
fp
.
name
,
SHA1_PATH
])
# Install on connected iOS device
if
IOSDevice
.
is_connected
()
and
args
.
local_build
:
if
IOSDevice
.
is_connected
()
and
args
.
ios_build_available
:
app_path
=
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_debug_build_path
,
IOS_APP_NAME
)
IOSDevice
.
install_app
(
app_path
)
# Install on iOS simulator if it's running
if
IOSSimulator
.
is_booted
()
and
args
.
local_build
:
if
IOSSimulator
.
is_booted
()
and
args
.
ios_sim_build_available
:
app_path
=
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_sim_debug_build_path
,
IOS_APP_NAME
)
IOSSimulator
.
fork_install_app
(
app_path
)
...
...
@@ -638,7 +638,14 @@ class StartListening(object):
continue
# Build the snapshot
sky_snapshot_path
=
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_sim_debug_build_path
,
'clang_x64'
,
'sky_snapshot'
)
if
args
.
ios_sim_build_available
:
sky_snapshot_path
=
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_sim_debug_build_path
,
'clang_x64'
,
'sky_snapshot'
)
elif
args
.
ios_build_available
:
sky_snapshot_path
=
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_debug_build_path
,
'clang_x64'
,
'sky_snapshot'
)
else
:
# If there is no build available, we can't make a snapshot
continue
cmd
=
[
sky_snapshot_path
,
'--package-root=packages'
,
...
...
@@ -839,6 +846,12 @@ class SkyShellRunner(object):
command
.
add_subparser
(
subparsers
)
args
=
parser
.
parse_args
()
# TODO(iansf): args is unfortunately just a global context variable. For now, add some additional context to it.
args
.
android_build_available
=
False
args
.
ios_build_available
=
False
args
.
ios_sim_build_available
=
False
# Also make sure that args is consistent with machine state for local builds
if
args
.
local_build
and
args
.
sky_src_path
is
None
:
real_sky_path
=
os
.
path
.
realpath
(
os
.
path
.
join
(
PACKAGES_DIR
,
'sky'
))
match
=
re
.
match
(
r'pub.dartlang.org/sky'
,
real_sky_path
)
...
...
@@ -863,6 +876,18 @@ class SkyShellRunner(object):
' path: /path/to/sky_engine/src/sky/packages/material_design_icons
\n
'
' sky:
\n
'
' path: /path/to/sky_engine/src/sky/packages/sky
\n
'
)
if
args
.
local_build
:
if
not
os
.
path
.
isdir
(
args
.
sky_src_path
):
logging
.
warning
(
'The selected sky-src-path ('
+
args
.
sky_src_path
+
') does not exist.'
'Disabling local-build flag.'
)
args
.
local_build
=
False
if
args
.
local_build
:
if
os
.
path
.
isdir
(
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
android_debug_build_path
)):
args
.
android_build_available
=
True
if
os
.
path
.
isdir
(
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_debug_build_path
)):
args
.
ios_build_available
=
True
if
os
.
path
.
isdir
(
os
.
path
.
join
(
args
.
sky_src_path
,
args
.
ios_sim_debug_build_path
)):
args
.
ios_sim_build_available
=
True
pids
=
Pids
.
read_from
(
PID_FILE_PATH
,
PID_FILE_KEYS
)
atexit
.
register
(
pids
.
write_to
,
PID_FILE_PATH
)
...
...
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