Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version file: Both client and server have version.py #16

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
13 changes: 2 additions & 11 deletions create_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Name of addon
# - e.g. 'maya'
ADDON_NAME: str = "kitsu"
# Name of folder where client code is located to copy 'version.py'
# Name of folder where client code is located
# - e.g. 'ayon_maya'
ADDON_CLIENT_DIR: str = "ayon_kitsu"

Expand Down Expand Up @@ -205,10 +205,6 @@ def copy_server_content(
filepaths_to_copy: list[tuple[str, str]] = []
server_dirpath: str = os.path.join(current_dir, "server")

# Version
src_version_path: str = os.path.join(current_dir, "version.py")
filepaths_to_copy.append((src_version_path, "version.py"))

frontend_dirpath: str = os.path.join(server_dirpath, "frontend")
frontend_dist_dirpath: str = os.path.join(frontend_dirpath, "dist")
yarn_executable = _get_yarn_executable()
Expand Down Expand Up @@ -266,11 +262,6 @@ def _get_client_zip_content(current_dir: str, log: logging.Logger):
log.info("Preparing client code zip")

output: list[tuple[str, str]] = []

src_version_path: str = os.path.join(current_dir, "version.py")
dst_version_path: str = os.path.join(ADDON_CLIENT_DIR, "version.py")
output.append((src_version_path, dst_version_path))

# Add client code content to zip
client_code_dir: str = os.path.join(client_dir, ADDON_CLIENT_DIR)
for path, sub_path in find_files_in_subdir(client_code_dir):
Expand Down Expand Up @@ -411,7 +402,7 @@ def main(
log.info("Client folder created")
return

version_filepath: str = os.path.join(current_dir, "version.py")
version_filepath: str = os.path.join(current_dir, "server", "version.py")
version_content: dict[str, Any] = {}
with open(version_filepath, "r") as stream:
exec(stream.read(), version_content)
Expand Down
1 change: 1 addition & 0 deletions server/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.0.2-dev1"