Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Makefile and add option to compile and install to the plugins directory #73

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading