Skip to content

Commit

Permalink
Merge pull request #73 from mirpedrol/make-install
Browse files Browse the repository at this point in the history
update Makefile and add option to compile and install to the plugins directory
  • Loading branch information
mirpedrol authored Dec 21, 2023
2 parents 127233d + 5b09001 commit 3f7dbc2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@

config ?= compileClasspath
version ?= $(shell grep 'Plugin-Version' plugins/nf-co2footprint/src/resources/META-INF/MANIFEST.MF | awk '{ print $$2 }')

ifdef module
mm = :${module}:
else
mm =
endif

NXF_HOME ?= $$HOME/.nextflow
NXF_PLUGINS_DIR ?= $(NXF_HOME)/plugins

clean:
./gradlew clean

Expand Down Expand Up @@ -44,6 +48,11 @@ else
./gradlew ${mm}test --tests ${class}
endif

install:
./gradlew copyPluginZip
rm -rf ${NXF_PLUGINS_DIR}/nf-co2footprint-${version}
cp -r build/plugins/nf-co2footprint-${version} ${NXF_PLUGINS_DIR}

#
# generate build zips under build/plugins
# you can install the plugin copying manually these files to $HOME/.nextflow/plugins
Expand Down
21 changes: 21 additions & 0 deletions docs/contributing/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,27 @@ To test with Nextflow for development purpose:
./launch.sh run -plugins nf-co2footprint <script/pipeline name> [pipeline params]
```

## Alternative: Compile and install to Nextflow plugins directory

!!! warning

This will install the compiled plugin code into your `$NXF_PLUGINS_DIR` directory (default: `${HOME}/.nextflow/plugins`).
If the plugin version from the manifest file (`plugins/nf-co2footprint/src/resources/META-INF/MANIFEST.MF`) of the dev code matches an existing plugin, any install will be overwritten.

1. Compile and install the plugin code

```bash
make compile
make install
```

2. Run nextflow with this command, specifying the plugin version:

```bash
nextflow run -plugins [email protected] <script/pipeline name> [pipeline params]
```


## Change and preview the docs

The docs are generated using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/). To change the docs, edit the files in the [docs/](docs/) folder and run the following command to generate the docs (after installing mkdocs via `pip install mkdocs-material`):
Expand Down

0 comments on commit 3f7dbc2

Please sign in to comment.