-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.nf
57 lines (46 loc) · 1.24 KB
/
main.nf
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
params.repo_url = null
process CloneRepository {
output:
path 'repo_path'
publishDir '.', mode: 'copy'
script:
"""
if [ -z "${params.repo_url}" ]; then
echo "Error: Please provide a repository URL using '--repo_url <repository-url>'"
exit 1
fi
echo "Cloning repository from ${params.repo_url}"
mkdir -p repo
git clone ${params.repo_url} repo
ls -la repo
echo "repo_path=${PWD}/repo" > repo_path
"""
}
// process CheckDependencies {
// input:
// path repo_path
// script:
// """
// cd ${repo_path}
// if [ -f requirements.txt ]; then
// echo "Found requirements.txt"
// elif [ -f environment.yml ]; then
// echo "Found environment.yml"
// elif [ -f package.json ]; then
// echo "Found package.json"
// else
// echo "No dependency files found" >&2
// exit 1
// fi
// """
// }
workflow {
// Debugging output
println "Workflow starting with repo_url: ${params.repo_url}"
if (!params.repo_url) {
error "Please provide a repository URL using '--repo_url <repository-url>'"
}
// Execute processes
def clonedRepo = CloneRepository()
// CheckDependencies(clonedRepo.repo_path)
}