1#! /usr/bin/env python 2# Copyright 2015 The Chromium Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import os 7import subprocess 8import sys 9 10sys.path.append(os.path.dirname(os.path.realpath(__file__))) 11import packaging 12 13 14def main(): 15 root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) 16 with packaging.TempAppDir(root_dir, symlinks=False) as temp_app_dir: 17 yaml_files = list(packaging.Yamls(temp_app_dir)) 18 args = ['gcloud', 'preview', 'app', 'deploy'] + yaml_files + sys.argv[1:] 19 subprocess.call(args, cwd=temp_app_dir) 20 21 22if __name__ == '__main__': 23 main() 24