Skip to content

Commit

Permalink
chore: add jbang script (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
manikmagar committed May 6, 2021
1 parent f05d766 commit 3883fbc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ scoop update mulefd
. Add `mulefd-<version>/bin` folder in to your $PATH
. Test running `mulefd --help` in CLI.

=== Running with JBang
You can run MuleFD using https://jbang.dev[JBang]. If you have jbang installed, you can run `jbang mulefd@manikmagar/mulefd` to run latest release of MuleFD.

=== Build and Run
This project uses Gradle to compile and build. To create a zip distribution, run below command in project directory -
[source, bash]
Expand Down
10 changes: 10 additions & 0 deletions jbang-catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

{
"catalogs": {},
"aliases": {
"mulefd": {
"script-ref": "jbang/mulefd.java",
"description": "Runs Mule Flow Diagrams"
}
}
}
18 changes: 18 additions & 0 deletions jbang/mulefd.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS mavencentral, jitpack
//JAVA 8+
//DEPS com.github.manikmagar:mulefd:v0.7.4

import com.javastreets.mulefd.app.Application;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Parameters;

import java.util.concurrent.Callable;

class mulefd {

public static void main(String... args) {
Application.main(args);
}
}

0 comments on commit 3883fbc

Please sign in to comment.