Flutter Engine
The Flutter Engine
generate_sdk_version_file.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
6import os
7import utils
8import sys
9
10SDK_VERSION_FILE = os.path.join(utils.DART_DIR, 'sdk', 'version')
11
12
13def Main():
14 version = utils.ReadVersionFile()
15 with open(SDK_VERSION_FILE, 'w') as versionFile:
16 versionFile.write(f'{version.major}.{version.minor}.0\n')
17 return 0
18
19
20if __name__ == '__main__':
21 sys.exit(Main())
def ReadVersionFile(version_file=None)
Definition: utils.py:381