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

Unified Diff: sky/tools/big_red_button.py

Issue 1214193007: Add big_red_button script so that others can deploy (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/big_red_button.py
diff --git a/sky/tools/big_red_button.py b/sky/tools/big_red_button.py
new file mode 100644
index 0000000000000000000000000000000000000000..c0968aefad1ecc8ad7669557865a09336bfb36d9
--- /dev/null
+++ b/sky/tools/big_red_button.py
@@ -0,0 +1,55 @@
+# Roll versions script:
+# /src/mojo/src/sky/apk/demo/AndroidManifest.xml version and string.
+# Update versions of pub packages:
+
+# Make a commit, upload it, land it.
+
+import os
+import subprocess
+
+def run(cwd, args):
+ print 'RUNNING:', ' '.join(args), 'IN:', cwd
+ subprocess.check_call(args, cwd=cwd)
+
+# Input paths:
+# FIXME: These could be args?
+MOJO_ROOT = '/src/mojo/src'
+SKY_SDK_ROOT = '/src/sky_sdk'
+DEMO_SITE_ROOT = '/src/domokit.github.io'
+
+# Derived paths:
+DART_SDK_ROOT = os.path.join(MOJO_ROOT, 'third_party/dart-sdk/dart-sdk')
+PUB_PATH = os.path.join(DART_SDK_ROOT, 'bin/pub')
+PACKAGES_ROOT = os.path.join(SKY_SDK_ROOT, 'packages')
+
+
+run(MOJO_ROOT, ['git', 'pull', '--rebase'])
+run(MOJO_ROOT, ['gclient', 'sync'])
+run(MOJO_ROOT, ['mojo/tools/mojob.py', 'gn', '--android', '--release'])
+run(MOJO_ROOT, ['mojo/tools/mojob.py', 'build', '--android', '--release'])
+# Run tests?
+
+run(SKY_SDK_ROOT, ['git', 'reset', '--hard', 'origin/master'])
+run(MOJO_ROOT, [
+ 'sky/tools/deploy_sdk.py',
+ '--non-interactive',
+ '--commit',
+ SKY_SDK_ROOT
+])
+# tag for version?
+
+run(DEMO_SITE_ROOT, ['git', 'reset', '--hard', 'origin/master'])
+run(MOJO_ROOT, ['mojo/tools/deploy_domokit_site.py', DEMO_SITE_ROOT])
+# tag for version?
+
+for package in os.listdir(PACKAGES_ROOT):
+ package_path = os.path.join(PACKAGES_ROOT, package)
+ if not os.path.isdir(package_path):
+ continue
+ run(package_path, [PUB_PATH, 'publish', '--force'])
+
+run(SKY_SDK_ROOT, ['git', 'push'])
+run(DEMO_SITE_ROOT, ['git', 'push'])
+
+# http://stackoverflow.com/questions/14665518/api-to-automatically-upload-apk-to-google-play
+# https://developers.google.com/resources/api-libraries/documentation/androidpublisher/v2/python/latest/androidpublisher_v2.edits.apks.html
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698