Skip to content

Commit

Permalink
feat: take "--against $REF"
Browse files Browse the repository at this point in the history
  • Loading branch information
cfm committed Dec 10, 2024
1 parent 7805f8d commit 234dbb8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/check-buildinfo
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def check_package(package: Path, buildinfos: dict) -> bool:
return False


def added_files(against="origin/main") -> List[Path]:
def added_files(against: str) -> List[Path]:
"""Get list of added files compared to main"""
added = []
output = subprocess.check_output([
Expand Down Expand Up @@ -79,10 +79,13 @@ def main():
description="Check packages against their buildinfo files"
)
parser.add_argument("buildinfos", type=Path, help="Folder with buildinfo files")
parser.add_argument(
"--against", default="origin/main", type=str, help="Git ref from which to detect changes"
)
args = parser.parse_args()
buildinfos = lookup_buildinfos(args.buildinfos)
status = 0
added = added_files()
added = added_files(args.against)
if not added:
print("No new packages detected.")
sys.exit(0)
Expand Down

0 comments on commit 234dbb8

Please sign in to comment.