Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add make install rule to make dev work easier #126

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

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

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

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

clean:
./gradlew clean
Expand All @@ -14,11 +17,9 @@ compile:
./gradlew compileGroovy
@echo "DONE `date`"


check:
./gradlew check


#
# Show dependencies try `make deps config=runtime`, `make deps config=google`
#
Expand All @@ -44,15 +45,17 @@ else
./gradlew ${mm}test --tests ${class}
endif


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

#
# Upload JAR artifacts to Maven Central
#
upload:
./gradlew upload


upload-plugins:
./gradlew plugins:upload

Expand Down
22 changes: 22 additions & 0 deletions docs/contributing/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ Run nextflow with this command:
./launch.sh run -plugins nf-validation <script/pipeline name> [pipeline params]
```

#### Alternative

!!! warning

This installs the compiled plugin code into your `$NXF_PLUGINS_DIR` (default: `${HOME}/.nextflow/plugins`)
directory. If the manifest version of your dev code matches an existing plugin any install will be overwritten.

Compile and install the plugin code

```bash
make compile
make install
```

Then run `nextflow` as normal and specifying your plugin version in your config e.g.

```
plugins {
id 'nf-validation@1.1.1'
}
```

## Change and preview the docs

The docs are generated using [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).
Expand Down