Skip to content

Commit

Permalink
fix: [PHP] allow for explicit version_string (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer authored Jul 20, 2022
1 parent 842f399 commit 97aff52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions synthtool/languages/php.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def owlbot_copy_version(
src: Path,
dest: Path,
copy_excludes: typing.Optional[typing.List[str]] = None,
version_string: str = None,
) -> None:
"""Copies files from a version subdirectory."""
logger.debug("owlbot_copy_version called from %s to %s", src, dest)
Expand All @@ -95,8 +96,9 @@ def owlbot_copy_version(
if not entries:
logger.info("there is no src directory '%s' to copy", src_dir)
return
version_string = os.path.basename(os.path.basename(next(entries))).lower()
logger.debug("version_string detected: %s", version_string)
if not version_string:
version_string = os.path.basename(os.path.basename(next(entries))).lower()
logger.debug("version_string detected: %s", version_string)

# copy all src including partial veneer classes
s.move([src / "src"], dest / "src", merge=_merge, excludes=copy_excludes)
Expand Down

0 comments on commit 97aff52

Please sign in to comment.