1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
def conda_func(wildcards, params):
env_name = f"{params.name_prefix}-test-env-{wildcards.version}"
shell(
f"mamba create -y -n {env_name} -c conda-forge --override-channels ripgrep=={wildcards.version}"
)
return env_name
onsuccess:
shell("conda env remove -y -n foo-test-env-12.1.1")
shell("conda env remove -y -n foo-test-env-13.0.0")
onerror:
shell("conda env remove -y -n foo-test-env-12.1.1")
shell("conda env remove -y -n foo-test-env-13.0.0")
rule all:
input:
"test_13.0.0_v.out",
"test_12.1.1_v.out",
rule a:
output:
"test_{version}_v.out",
params:
name_prefix="foo",
conda:
conda_func
shell:
r"rg --version | head -n1 | grep -o 'ripgrep [0-9]*\.[0-9]*\.[0-9]*' > {output}"
|