Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: sky/tools/deploy_sdk.py

Issue 1016143002: Update deploy and deploy_sdk for the new package: world. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/apk/demo/org/domokit/sky/demo/SkyDemoActivity.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/deploy_sdk.py
diff --git a/sky/tools/deploy_sdk.py b/sky/tools/deploy_sdk.py
index c74ab0da43cd384eae7ae849e0e4a522a0b774d3..ffb38ac1417510d5a4eb5109db11cee0cd05a1f9 100755
--- a/sky/tools/deploy_sdk.py
+++ b/sky/tools/deploy_sdk.py
@@ -85,6 +85,11 @@ def link(from_root, to_root, filter_func=None):
os.symlink(from_root, to_root)
+def make_relative_symlink(source, link_name):
+ rel_source = os.path.relpath(source, os.path.dirname(link_name))
+ os.symlink(rel_source, link_name)
+
+
def confirm(prompt):
response = raw_input('%s [N]|y: ' % prompt)
return response and response.lower() == 'y'
@@ -117,6 +122,7 @@ def main():
default=os.path.join(SRC_ROOT, DEFAULT_REL_BUILD_DIR))
parser.add_argument('--non-interactive', action='store_true')
parser.add_argument('--dev-environment', action='store_true')
+ parser.add_argument('--commit', action='store_true')
parser.add_argument('--fake-pub-get-into', action='store', type=str)
args = parser.parse_args()
@@ -129,7 +135,7 @@ def main():
# These are separate ideas but don't need a separate flag yet.
use_links = args.dev_environment
skip_apks = args.dev_environment
- should_commit = not args.dev_environment
+ should_commit = args.commit
generate_licenses = not args.dev_environment
# We save a bunch of time in --dev-environment mode by symlinking whole
@@ -201,9 +207,9 @@ def main():
if args.fake_pub_get_into:
packages_dir = os.path.abspath(args.fake_pub_get_into)
ensure_dir_exists(packages_dir)
- os.symlink(sdk_path('packages/mojo/lib'),
+ make_relative_symlink(sdk_path('packages/mojo/lib'),
os.path.join(packages_dir, 'mojo'))
- os.symlink(sdk_path('packages/sky/lib'),
+ make_relative_symlink(sdk_path('packages/sky/lib'),
os.path.join(packages_dir, 'sky'))
if should_commit:
« no previous file with comments | « sky/apk/demo/org/domokit/sky/demo/SkyDemoActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698