示例#1
0
def CopyToBucket(source, destination):
  source = os.path.join(_out_dir, source, 'flutter_jit_runner_far')
  CreateMetaPackage(source)
  pm_bin = GetPMBinPath()
  key_path = os.path.join(_script_dir, 'development.key')

  destination = os.path.join(_bucket_directory, destination)
  CreateFarPackage(pm_bin, source, key_path, destination)
示例#2
0
def CopyToBucket(source, destination):
    source = os.path.join(_out_dir, source)
    temp_artifact_dir = tempfile.mkdtemp()

    GatherArtifacts(source, temp_artifact_dir)
    pm_bin = GetPMBinPath()
    key_path = os.path.join(_script_dir, 'development.key')

    destination = os.path.join(_bucket_directory, destination)
    CreateFarPackage(pm_bin, temp_artifact_dir, key_path, destination)
示例#3
0
def CopyToBucket(source, destination, product=False):
    runner_name = 'flutter_jit_runner'
    if product:
        runner_name = 'flutter_jit_product_runner'
    far_dir = '%s_far' % runner_name
    source_root = os.path.join(_out_dir, source)
    source = os.path.join(source_root, far_dir)
    CreateMetaPackage(source, runner_name)
    pm_bin = GetPMBinPath()
    key_path = os.path.join(_script_dir, 'development.key')

    destination = os.path.join(_bucket_directory, destination)
    CreateFarPackage(pm_bin, source, key_path, destination)
    patched_sdk_dir = os.path.join(source_root, 'flutter_runner_patched_sdk')
    dest_sdk_path = os.path.join(destination, 'flutter_runner_patched_sdk')
    CopyPath(patched_sdk_dir, dest_sdk_path)
def CopyToBucketWithMode(source, destination, aot, product, runner_type):
  mode = 'aot' if aot else 'jit'
  product_suff = '_product' if product else ''
  runner_name = '%s_%s%s_runner' % (runner_type, mode, product_suff)
  far_dir_name = '%s_far' % runner_name
  source_root = os.path.join(_out_dir, source)
  far_base = os.path.join(source_root, far_dir_name)
  CreateMetaPackage(far_base, runner_name)
  pm_bin = GetPMBinPath()
  key_path = os.path.join(_script_dir, 'development.key')

  destination = os.path.join(_bucket_directory, destination, mode)
  CreateFarPackage(pm_bin, far_base, key_path, destination)
  patched_sdk_dir = os.path.join(source_root, 'flutter_runner_patched_sdk')
  dest_sdk_path = os.path.join(destination, 'flutter_runner_patched_sdk')
  if not os.path.exists(dest_sdk_path):
    CopyPath(patched_sdk_dir, dest_sdk_path)
  CopyGenSnapshotIfExists(source_root, destination)