mirror of
https://github.com/hanzoai/yoga.git
synced 2026-10-30 19:34:29 +00:00
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1877 CocoaPods is deprecated, and the repository is going read-only by the end of the year. This change removes the logic for the version of Yoga we have been publishing to CocoaPods trunk. https://cocoapods.org/pods/Yoga This change does not effect React Native, which keeps its own Yoga podspec. The mainline Yoga repo keeps a continually validated SwiftPM build, that should be used for new versions of Yoga. Reviewed By: cortinico, cipolleschi Differential Revision: D93553409 fbshipit-source-id: 5df4f0222fa53c2388ee227c3e22514fec794177
38 lines
980 B
Python
Executable File
38 lines
980 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
import os
|
|
import re
|
|
import sys
|
|
|
|
os.chdir(os.path.dirname(__file__))
|
|
|
|
if len(sys.argv) != 2:
|
|
print("usage: ./set-version <version>", file=sys.stderr)
|
|
sys.exit(1)
|
|
|
|
version = sys.argv[1]
|
|
|
|
with open("gradle.properties", "r+") as f:
|
|
new_contents = re.sub(r"VERSION_NAME=.*", f"VERSION_NAME={version}", f.read())
|
|
f.seek(0)
|
|
f.truncate()
|
|
f.write(new_contents)
|
|
|
|
with open("javascript/package.json", "r+") as f:
|
|
new_contents = re.sub(r'"version": ".*",', f'"version": "{version}",', f.read())
|
|
f.seek(0)
|
|
f.truncate()
|
|
f.write(new_contents)
|
|
|
|
with open("website/package.json", "r+") as f:
|
|
new_contents = re.sub(
|
|
r'"yoga-layout": ".*"', f'"yoga-layout": "{version}"', f.read()
|
|
)
|
|
f.seek(0)
|
|
f.truncate()
|
|
f.write(new_contents)
|