Home | History | Annotate | Download | only in bin
      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 
      6 import os
      7 import subprocess
      8 import sys
      9 
     10 sys.path.append(os.path.dirname(os.path.realpath(__file__)))
     11 import packaging
     12 
     13 
     14 def 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 
     22 if __name__ == '__main__':
     23   main()
     24