Skip to content

Commit

Permalink
Merge pull request #11 from SubstrateLabs/liam/update-sync-verison
Browse files Browse the repository at this point in the history
Update `sync_version.py` to also write to `substrate/_version.py` for API version
  • Loading branch information
0thernet authored May 7, 2024
2 parents f920ee6 + e1671a4 commit b331a49
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "substrate"
version = "120240502.0.1"
version = "120240502.0.2"
description = "Substrate Python SDK"
readme = "README.md"
authors = [ "vprtwn <[email protected]>", "liamgriffiths <[email protected]>",]
Expand Down
11 changes: 10 additions & 1 deletion scripts/sync_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def ok(message):
print("\033[32m✓\033[0m", message)


SDK_VERSION = "1.0.1"
SDK_VERSION = "1.0.2"

# Update version
version_path = "substrate/GEN_VERSION"
Expand All @@ -29,3 +29,12 @@ def ok(message):
with open(toml_path, "w") as f:
toml.dump(toml_content, f)
ok(f"Updated version to {new_version} in {toml_path}")

# Write the API Version (as a formatted date) to the following. This is used by the
# SDK client to select which API version to use and should be in sync with the types
# used in the SDK.
version_file = "substrate/_version.py"
with open(version_file, "w") as f:
version_file_content = f"__version__ = \"{new_version}\""
f.write(version_file_content)
ok(f"Updated {version_file} content to {version_file_content}")
2 changes: 1 addition & 1 deletion substrate/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "020240311.0.1"
__version__ = "120240502.0.2"

0 comments on commit b331a49

Please sign in to comment.