diff --git a/Yoga.podspec b/Yoga.podspec index 1c01089c..74b3971e 100644 --- a/Yoga.podspec +++ b/Yoga.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |spec| spec.name = 'Yoga' - spec.version = '2.0.0-beta.1' + spec.version = '2.0.0' spec.license = { :type => 'MIT', :file => "LICENSE" } spec.homepage = 'https://yogalayout.com/' spec.documentation_url = 'https://yogalayout.com/docs' diff --git a/YogaKit.podspec b/YogaKit.podspec index 07b24480..da288909 100644 --- a/YogaKit.podspec +++ b/YogaKit.podspec @@ -5,7 +5,7 @@ podspec = Pod::Spec.new do |spec| spec.name = 'YogaKit' - spec.version = '2.0.0-beta.1' + spec.version = '2.0.0' spec.license = { :type => 'MIT', :file => "LICENSE" } spec.homepage = 'https://facebook.github.io/yoga/' spec.documentation_url = 'https://facebook.github.io/yoga/docs/' @@ -31,4 +31,3 @@ end # See https://github.com/facebook/yoga/pull/366 podspec.attributes_hash["readme"] = "YogaKit/README.md" -podspec diff --git a/gradle.properties b/gradle.properties index bf5e62b7..e205cdeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,4 +11,4 @@ android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M -VERSION_NAME=1.19.0 \ No newline at end of file +VERSION_NAME=2.0.0 diff --git a/javascript/package.json b/javascript/package.json index bbb7d45c..6aa15ab3 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "yoga-layout", - "version": "2.0.0-beta.1", + "version": "2.0.0", "description": "JavaScript bindings for the Yoga layout engine", "license": "MIT", "repository": { diff --git a/set-version.py b/set-version.py new file mode 100755 index 00000000..37ea57b7 --- /dev/null +++ b/set-version.py @@ -0,0 +1,37 @@ +#!/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 ", 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.write(new_contents) + + +with open("javascript/package.json", "r+") as f: + new_contents = re.sub(r'"version": ".*",', f'"version": "{version}",', f.read()) + print(new_contents) + f.seek(0) + f.write(new_contents) + +for podspec in ["Yoga.podspec", "YogaKit.podspec"]: + with open(podspec, "r+") as f: + new_contents = re.sub( + r"spec\.version = '.*'", f"spec.version = '{version}'", f.read() + ) + f.seek(0) + f.write(new_contents)