mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This PR changes the format check on CI to use the command added in https://github.com/flutter/engine/pull/50747. Additionally, while making this change, I noticed that the CI check was not checking the formatting of all files, and that as a result, files were present in the repo with incorrect formatting. I have fixed the formatting and fixed the check to always check all files.
37 lines
970 B
Python
37 lines
970 B
Python
#!/usr/bin/env python
|
|
|
|
# Copyright 2022 Google LLC
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
EMSDK_ROOT = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'buildtools', 'emsdk'))
|
|
|
|
EMSDK_PATH = os.path.join(EMSDK_ROOT, 'emsdk.py')
|
|
|
|
# See lib/web_ui/README.md for instructions on updating the EMSDK version.
|
|
EMSDK_VERSION = '3.1.44'
|
|
|
|
|
|
def main():
|
|
try:
|
|
subprocess.check_call([sys.executable, EMSDK_PATH, 'install', EMSDK_VERSION],
|
|
stdout=subprocess.DEVNULL)
|
|
except subprocess.CalledProcessError:
|
|
print('Failed to install emsdk')
|
|
return 1
|
|
try:
|
|
subprocess.check_call([sys.executable, EMSDK_PATH, 'activate', EMSDK_VERSION],
|
|
stdout=subprocess.DEVNULL)
|
|
except subprocess.CalledProcessError:
|
|
print('Failed to activate emsdk')
|
|
return 1
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(main())
|