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

Unified Diff: scripts/slave/recipes.py

Issue 1241323004: Cross-repo recipe package system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved show_me_the_modules into recipe_engine Created 5 years, 4 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
Index: scripts/slave/recipes.py
diff --git a/scripts/slave/recipes.py b/scripts/slave/recipes.py
new file mode 100755
index 0000000000000000000000000000000000000000..31266e09fec1c9f0e3c3a4755eeef2d551c9f309
--- /dev/null
+++ b/scripts/slave/recipes.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+"""Bootstrap script to clone and forward to the recipe engine tool."""
+
+import os
+import subprocess
+import sys
+
+SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
+REPO_ROOT = os.path.dirname(os.path.dirname(SCRIPT_DIR))
+ENGINE_REPO = '/b/build'
+ENGINE_BRANCH = 'recipe-packages'
+ENGINE_DIR = os.path.join(SCRIPT_DIR, '.recipe_engine')
+ENGINE_SUBDIR = os.path.join(ENGINE_DIR, 'third_party', 'recipe_engine')
+
+if not os.path.exists(ENGINE_DIR):
iannucci 2015/08/06 23:57:12 let's use `git rev-parse --something` to find the
+ subprocess.check_call(['git', 'clone', ENGINE_REPO, ENGINE_DIR])
+
+ # TODO(luqui): this stuff is just for pre-move testing
+ cwd = os.getcwd()
+ os.chdir(ENGINE_DIR)
+ subprocess.check_call(['git', 'reset', '--hard', 'origin/%s' % ENGINE_BRANCH])
+ os.chdir(cwd)
+
+args = [sys.argv[0]] + ['--package', REPO_ROOT] + sys.argv[1:]
+os.execvp(os.path.join(ENGINE_SUBDIR, 'recipes.py'), args)

Powered by Google App Engine
This is Rietveld 408576698