Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions polyapi/deployables.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ def get_all_deployable_files_windows(config: PolyDeployConfig) -> List[str]:
pattern = ' '.join(f"/C:\"polyConfig: {name}\"" for name in config["type_names"]) or '/C:"polyConfig"'

exclude_command = f" | findstr /V /I \"{exclude_pattern}\"" if exclude_pattern else ''
search_command = f" | findstr /S /M /I /F:/ {pattern} *.*"
search_command = f" | findstr /M /I /F:/ {pattern}"

result = []
for dir_path in config["include_dirs"]:
if dir_path != '.':
include_pattern = " ".join(f"{dir_path}*.{f}" for f in config["include_files_or_extensions"]) or "*"
dir_command = f"dir {include_pattern} /S /P /B > NUL"
dir_command = f"dir {include_pattern} /S /P /B"
full_command = f"{dir_command}{exclude_command}{search_command}"
try:
output = subprocess.check_output(full_command, shell=True, text=True)
Expand Down
8 changes: 5 additions & 3 deletions polyapi/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,13 @@ def prepare_deployables(lazy: bool = False, disable_docs: bool = False, disable_
write_updated_deployable(deployable, disable_docs)
# Re-stage any updated staged files.
staged = subprocess.check_output('git diff --name-only --cached', shell=True, text=True, ).split('\n')
rootPath = subprocess.check_output('git rev-parse --show-toplevel', shell=True, text=True).replace('\n', '')
for deployable in dirty_deployables:
try:
if deployable["file"] in staged:
print(f'Staging {deployable["file"]}')
subprocess.run(['git', 'add', deployable["file"]])
deployableName = deployable["file"].replace('\\', '/').replace(f"{rootPath}/", '')
if deployableName in staged:
print(f'Staging {deployableName}')
subprocess.run(['git', 'add', deployableName])
except:
print('Warning: File staging failed, check that all files are staged properly.')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]

[project]
name = "polyapi-python"
version = "0.3.9.dev1"
version = "0.3.9.dev2"
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
dependencies = [
Expand Down