Skip to content

Commit

Permalink
Make trunk builds "0.0.0" (#1466)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/react-native#41423

Pull Request resolved: #1466

Right now Yoga's main branch says it's 2.0.0, and RN's dirsync says its 1.14.0, but the code is really closer to what will be Yoga 3.0.0.

This changes trunk builds to "0.0.0" for clarity, which will be assigned a real version number the first time publishing a new Yoga branch.

This is separately a good practice to prevent the chance of accidental publishes causing damage.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D51236778

fbshipit-source-id: 06cac89bcca1c707ce5c00f9c346f627eef6b4bc
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Nov 14, 2023
1 parent 8c1a672 commit bb892af
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Yoga.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Pod::Spec.new do |spec|
spec.name = 'Yoga'
spec.version = '2.0.0'
spec.version = '0.0.0'
spec.license = { :type => 'MIT', :file => "LICENSE" }
spec.homepage = 'https://yogalayout.dev/'
spec.documentation_url = 'https://yogalayout.dev/docs'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ android.useAndroidX=true

org.gradle.jvmargs=-Xmx1536M

VERSION_NAME=2.0.0
VERSION_NAME=0.0.0
2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yoga-layout",
"version": "2.0.0",
"version": "0.0.0",
"description": "An embeddable and performant flexbox layout engine with bindings for multiple languages",
"license": "MIT",
"author": "Meta Open Source",
Expand Down
8 changes: 8 additions & 0 deletions set-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
f.truncate()
f.write(new_contents)

with open("website-next/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)

with open("Yoga.podspec", "r+") as f:
new_contents = re.sub(
r"spec\.version = '.*'", f"spec.version = '{version}'", f.read()
Expand Down
2 changes: 1 addition & 1 deletion website-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prism-react-renderer": "^2.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"yoga-layout": "^2.0.0"
"yoga-layout": "0.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.0.0",
Expand Down

0 comments on commit bb892af

Please sign in to comment.