Skip to content

Commit 0053bef

Browse files
hjfreyerHunter Freyer
andauthored
[build_fuchsia_artifacts] Move license copying into BuildBucket(). (flutter#25815)
Currently, the licenses are copied into the bucket just before uploading it. Copying the licenses is definitely more about "building" the bucket than it is about "processing the CIPD package", but concretely, some tools complain if the license files arent there, and I'd like to be able to use the cipd tool to upload the bucket directly. Co-authored-by: Hunter Freyer <[email protected]>
1 parent 1077da8 commit 0053bef

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

tools/fuchsia/build_fuchsia_artifacts.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,27 @@ def BuildBucket(runtime_mode, arch, optimized, product):
176176
CopyVulkanDepsToBucket(out_dir, deps_dir, arch)
177177
CopyIcuDepsToBucket(out_dir, deps_dir)
178178

179+
# Copy the CIPD YAML template from the source directory to be next to the bucket
180+
# we are about to package.
181+
cipd_yaml = os.path.join(_script_dir, 'fuchsia.cipd.yaml')
182+
CopyFiles(cipd_yaml, os.path.join(_bucket_directory, 'fuchsia.cipd.yaml'))
183+
184+
# Copy the license files from the source directory to be next to the bucket we
185+
# are about to package.
186+
bucket_root = os.path.join(_bucket_directory, 'flutter')
187+
licenses_root = os.path.join(_src_root_dir, 'flutter/ci/licenses_golden')
188+
license_files = [
189+
'licenses_flutter',
190+
'licenses_fuchsia',
191+
'licenses_gpu',
192+
'licenses_skia',
193+
'licenses_third_party'
194+
]
195+
for license in license_files:
196+
src_path = os.path.join(licenses_root, license)
197+
dst_path = os.path.join(bucket_root, license)
198+
CopyPath(src_path, dst_path)
199+
179200
def CheckCIPDPackageExists(package_name, tag):
180201
'''Check to see if the current package/tag combo has been published'''
181202
command = [
@@ -207,27 +228,6 @@ def RunCIPDCommandWithRetries(command):
207228
raise
208229

209230
def ProcessCIPDPackage(upload, engine_version):
210-
# Copy the CIPD YAML template from the source directory to be next to the bucket
211-
# we are about to package.
212-
cipd_yaml = os.path.join(_script_dir, 'fuchsia.cipd.yaml')
213-
CopyFiles(cipd_yaml, os.path.join(_bucket_directory, 'fuchsia.cipd.yaml'))
214-
215-
# Copy the license files from the source directory to be next to the bucket we
216-
# are about to package.
217-
bucket_root = os.path.join(_bucket_directory, 'flutter')
218-
licenses_root = os.path.join(_src_root_dir, 'flutter/ci/licenses_golden')
219-
license_files = [
220-
'licenses_flutter',
221-
'licenses_fuchsia',
222-
'licenses_gpu',
223-
'licenses_skia',
224-
'licenses_third_party'
225-
]
226-
for license in license_files:
227-
src_path = os.path.join(licenses_root, license)
228-
dst_path = os.path.join(bucket_root, license)
229-
CopyPath(src_path, dst_path)
230-
231231
if not upload or not IsLinux():
232232
RunCIPDCommandWithRetries([
233233
'cipd', 'pkg-build', '-pkg-def', 'fuchsia.cipd.yaml', '-out',

0 commit comments

Comments
 (0)