Skip to content

Commit

Permalink
Fix archive name autodetection on OBS serveur
Browse files Browse the repository at this point in the history
Archive filename when using "tar_scm" and "recompress" services is
_service:recompress:tar_scm:my_proj-1.0.0.tar.gz
So update code to support both localrun with "basic" filename and obs
server usecase.

Signed-off-by: Sebastien Douheret <[email protected]>
  • Loading branch information
sebd71 committed Oct 5, 2020
1 parent 56a7e10 commit 7bee5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions go_modules
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def archive_autodetect():
exit(1)
else:
spec_dir = spec.parent # typically the same as cwd
spec_stem = spec.stem # stem is app in app.spec
spec_stem = spec.stem.split(":")[-1] # stem is app in app.spec
# highest sorted archive under spec_dir
pattern = f"{spec.stem}*.{archive_ext}"
pattern = f"*{spec_stem}*.{archive_ext}"
archive = next(reversed(sorted(Path(spec_dir).glob(pattern))), None)
if not archive:
log.error(f"Archive autodetection found no matching archive under {cwd}")
Expand Down

0 comments on commit 7bee5c3

Please sign in to comment.