mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
chore: add --exact (-e) to x.py to pick a single target exactly
This commit is contained in:
parent
ee8f5b7c14
commit
4fd8b203fd
5
x.py
5
x.py
@ -11,6 +11,7 @@ from subprocess import check_call, check_output, PIPE
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-v", "--verbose", action="store_true")
|
||||
parser.add_argument("-q", "--quiet", action="store_true")
|
||||
parser.add_argument("-e", "--exact", action="store_true")
|
||||
parser.add_argument("target", nargs="?")
|
||||
parser.add_argument("-l", "--list-targets", action="store_true")
|
||||
parser.add_argument("--coverage", action="store_true")
|
||||
@ -33,6 +34,10 @@ def should_run(tag):
|
||||
return False
|
||||
|
||||
if argv.target is not None:
|
||||
if argv.exact:
|
||||
if argv.target != tag:
|
||||
return False
|
||||
|
||||
if not re.match(argv.target.replace("_", ".*?"), tag):
|
||||
return False
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user