|
| 1 | +Development And Contributing Instructions |
| 2 | +========================================= |
| 3 | + |
| 4 | +Creating a Python package |
| 5 | +------------------------- |
| 6 | + |
| 7 | +:memo: TODO: add instructions for packaging for plain Python! |
| 8 | + |
| 9 | +Making a new release via Maven |
| 10 | +------------------------------ |
| 11 | + |
| 12 | +To create a new release, clone the [scijava-scripts][gh_scijava-scripts] repo |
| 13 | +(e.g. in `/opt/imagej/`) and run the `release-version.sh` helper: |
| 14 | + |
| 15 | +```bash |
| 16 | +BASE_DIR=/opt/imagej |
| 17 | +mkdir -pv "$BASE_DIR" |
| 18 | +cd "$BASE_DIR" |
| 19 | +git clone https://github.com/scijava/scijava-scripts |
| 20 | +cd - |
| 21 | + |
| 22 | +RELEASE_SCRIPT="$BASE_DIR/scijava-scripts/release-version.sh" |
| 23 | + |
| 24 | +$RELEASE_SCRIPT --skip-push --skip-gpg --skip-license-update |
| 25 | +``` |
| 26 | + |
| 27 | +Build & Deploy with Maven using Visual Studio Code |
| 28 | +-------------------------------------------------- |
| 29 | + |
| 30 | +Building and deploying the package can be greatly simplified using "tasks" in |
| 31 | +[Visual Studio Code][www_vscode]. By adding the following settings to the |
| 32 | +`.vscode/tasks.json` file, you can simply press `Ctrl+Shift+B` in VS Code and |
| 33 | +select the *deploy* task for running Maven and have the resulting JAR file being |
| 34 | +placed in `/opt/fiji-packaging/Fiji.app/jars/` (adjust to your path as |
| 35 | +necessary): |
| 36 | + |
| 37 | +```json |
| 38 | +{ |
| 39 | + "version": "2.0.0", |
| 40 | + "tasks": [ |
| 41 | + { |
| 42 | + "label": "verify", |
| 43 | + "type": "shell", |
| 44 | + "command": "mvn -B verify", |
| 45 | + "group": "build" |
| 46 | + }, |
| 47 | + { |
| 48 | + "label": "test", |
| 49 | + "type": "shell", |
| 50 | + "command": "mvn -B test", |
| 51 | + "group": "test" |
| 52 | + }, |
| 53 | + { |
| 54 | + "label": "deploy", |
| 55 | + "type": "shell", |
| 56 | + "command": "mvn -Dimagej.app.directory=/opt/fiji-packaging/Fiji.app", |
| 57 | + "group": { |
| 58 | + "kind": "build", |
| 59 | + "isDefault": true |
| 60 | + }, |
| 61 | + "problemMatcher": [] |
| 62 | + } |
| 63 | + ] |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +[gh_scijava-scripts]: https://github.com/scijava/scijava-scripts |
| 68 | +[www_vscode]: https://code.visualstudio.com/ |
0 commit comments