mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
e04f5885b8
This will be used to analyze the unpatched SDK. The file contains only the major and minor part of the version number. The patch version will always be 0. This is sufficient for the analyzer to construct a language version. Change-Id: Ief71ce617b279f7c688e9068c425bc31394cbf5f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243660 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
21 lines
572 B
Python
Executable file
21 lines
572 B
Python
Executable file
#!/usr/bin/env python3
|
|
# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import os
|
|
import utils
|
|
import sys
|
|
|
|
SDK_VERSION_FILE = os.path.join(utils.DART_DIR, 'sdk', 'version')
|
|
|
|
|
|
def Main():
|
|
version = utils.ReadVersionFile()
|
|
with open(SDK_VERSION_FILE, 'w') as versionFile:
|
|
versionFile.write(f'{version.major}.{version.minor}.0\n')
|
|
return 0
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(Main())
|