mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-12 16:28:17 +00:00
Add envvar to enable automatic .gitignore creation for workdirs
This commit is contained in:
parent
1e1aea0b1e
commit
a190994098
|
@ -415,6 +415,10 @@ def run_task(taskname):
|
||||||
my_opt_tmpdir = True
|
my_opt_tmpdir = True
|
||||||
my_workdir = tempfile.mkdtemp()
|
my_workdir = tempfile.mkdtemp()
|
||||||
|
|
||||||
|
if os.getenv("SBY_WORKDIR_GITIGNORE"):
|
||||||
|
with open(f"{my_workdir}/.gitignore", "w") as gitignore:
|
||||||
|
print("*", file=gitignore)
|
||||||
|
|
||||||
junit_ts_name = os.path.basename(sbyfile[:-4]) if sbyfile is not None else workdir if workdir is not None else "stdin"
|
junit_ts_name = os.path.basename(sbyfile[:-4]) if sbyfile is not None else workdir if workdir is not None else "stdin"
|
||||||
junit_tc_name = taskname if taskname is not None else "default"
|
junit_tc_name = taskname if taskname is not None else "default"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue