mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
* Use manifest file to better replicate the existing build Also fix app/bin error * Add remaining shit * patch in the remaining stuff * Update BUILD.gn
44 lines
900 B
Python
Executable File
44 lines
900 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2013 The Flutter Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
""" Parses manifest file and dumps it to json.
|
|
"""
|
|
|
|
import argparse
|
|
import json
|
|
import os
|
|
import sys
|
|
import hashlib
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
|
|
parser.add_argument(
|
|
'--input', dest='file_path', action='store', required=True)
|
|
|
|
args = parser.parse_args()
|
|
|
|
files = open(args.file_path, 'r')
|
|
lines = files.read().split()
|
|
|
|
output = {}
|
|
|
|
for line in lines:
|
|
key, val = line.strip().split('=')
|
|
md5 = hashlib.md5(key.encode()).hexdigest()
|
|
hash_key = 'md5_%s' % md5
|
|
# Uncomment this line to get the hash keys
|
|
# print val, hash_key
|
|
output[hash_key] = os.path.dirname(val)
|
|
|
|
print(json.dumps(output))
|
|
|
|
return 0
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|