(sdk_json)
| 203 | exit_with_error("local build was requested, but TACTILITY_SDK_PATH environment variable is not set.") |
| 204 | |
| 205 | def validate_self(sdk_json): |
| 206 | if not "toolVersion" in sdk_json: |
| 207 | exit_with_error("Server returned invalid SDK data format (toolVersion not found)") |
| 208 | if not "toolCompatibility" in sdk_json: |
| 209 | exit_with_error("Server returned invalid SDK data format (toolCompatibility not found)") |
| 210 | if not "toolDownloadUrl" in sdk_json: |
| 211 | exit_with_error("Server returned invalid SDK data format (toolDownloadUrl not found)") |
| 212 | tool_version = sdk_json["toolVersion"] |
| 213 | tool_compatibility = sdk_json["toolCompatibility"] |
| 214 | if tool_version != ttbuild_version: |
| 215 | print_warning(f"New version available: {tool_version} (currently using {ttbuild_version})") |
| 216 | print_warning(f"Run 'tactility.py updateself' to update.") |
| 217 | if re.search(tool_compatibility, ttbuild_version) is None: |
| 218 | print_error("The tool is not compatible anymore.") |
| 219 | print_error("Run 'tactility.py updateself' to update.") |
| 220 | sys.exit(1) |
| 221 | |
| 222 | #endregion Validation |
| 223 |
no test coverage detected