Skip to content

Commit

Permalink
feat: add manifest.version entry & read from VERSION file (#213)
Browse files Browse the repository at this point in the history
* feat: add manifest.version entry & read from VERSION file

* chore: update CHANGELOG.md
  • Loading branch information
kelly-sovacool authored Nov 25, 2024
1 parent 9f3722e commit d116319
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## CHAMPAGNE development version

- The CHAMPAGNE nextflow workflow now has a version entry in `nextflow.config`, in compliance with nf-core. (#213, @kelly-sovacool)

## CHAMPAGNE 0.4.0

### New features
Expand Down
6 changes: 5 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
log.info """\
CHAMPAGNE 🍾
CHAMPAGNE $workflow.manifest.version 🍾
=============
NF version : $nextflow.version
runName : $workflow.runName
Expand Down Expand Up @@ -48,6 +48,10 @@ workflow.onComplete {
}
}

workflow version {
println "CHAMPAGNE ${workflow.manifest.version}"
}

workflow DOWNLOAD_SRA {
ch_sra = Channel.from(file(params.sra_csv)) // assets/test_human_metadata.csv
.splitCsv ( header:true, sep:',' )
Expand Down
3 changes: 3 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,16 @@ report {

includeConfig 'conf/modules.config'

String pipeline_version = new File("${projectDir}/VERSION").text

manifest {
name = "CCBR/CHAMPAGNE"
author = "CCR Collaborative Bioinformatics Resource"
homePage = "https://github.com/CCBR/CHAMPAGNE"
description = "CHromAtin iMmuno PrecipitAtion sequencinG aNalysis pipEline"
mainScript = "main.nf"
defaultBranch = "main"
version = "${pipeline_version}"
}

// Function to ensure that resource requirements don't go beyond
Expand Down

0 comments on commit d116319

Please sign in to comment.