Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/unwanted_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ checkUnwantedDeps '//publish:cel' '@maven_android//:com_google_protobuf_protobuf
# cel_runtime_android shouldn't depend on the full protobuf runtime or antlr
checkUnwantedDeps '//publish:cel_runtime_android' '@maven//:com_google_protobuf_protobuf_java'
checkUnwantedDeps '//publish:cel_runtime_android' '@maven//:org_antlr_antlr4_runtime'

# cel shouldn't depend on the verifier
checkUnwantedDeps '//publish:cel' '//verifier/'

exit 0
21 changes: 20 additions & 1 deletion publish/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@bazel_common//tools/maven:pom_file.bzl", "pom_file")
load("@rules_jvm_external//:defs.bzl", "java_export")
load("@rules_jvm_external//:defs.bzl", "java_export", "maven_export")
load("//publish:cel_version.bzl", "CEL_VERSION")

# Note: These targets must reference the build targets in `src` directly in
Expand Down Expand Up @@ -349,3 +349,22 @@ java_export(
pom_template = ":cel_verifier_pom",
exports = VERIFIER_TARGETS + [":cel"],
)

pom_file(
name = "cel_verifier_cli_pom",
substitutions = {
"CEL_VERSION": CEL_VERSION,
"CEL_ARTIFACT_ID": "verifier-cli",
"PACKAGE_NAME": "CEL Java Verifier CLI",
"PACKAGE_DESC": "Formal verification CLI and REPL tool for Common Expression Language for Java.",
},
targets = [],
template_file = "pom_template.xml",
)

maven_export(
name = "cel_verifier_cli",
maven_coordinates = "dev.cel:verifier-cli:%s" % CEL_VERSION,
pom_template = ":cel_verifier_cli_pom",
target = "//verifier/src/main/java/dev/cel/verifier/tools:cel_verifier_tool_deploy.jar",
)
2 changes: 1 addition & 1 deletion publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# Note, to run script: Bazel and jq are required

ALL_TARGETS=("//publish:cel_common.publish" "//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish" "//publish:cel_runtime_android.publish")
ALL_TARGETS=("//publish:cel_common.publish" "//publish:cel.publish" "//publish:cel_compiler.publish" "//publish:cel_runtime.publish" "//publish:cel_v1alpha1.publish" "//publish:cel_protobuf.publish" "//publish:cel_runtime_android.publish" "//publish:cel_verifier.publish" "//publish:cel_verifier_cli.publish")
JDK8_FLAGS="--java_language_version=8 --java_runtime_version=8"

function publish_maven_remote() {
Expand Down
1 change: 1 addition & 0 deletions verifier/src/main/java/dev/cel/verifier/tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package(
"//:license",
],
default_visibility = [
"//publish:__pkg__",
"//verifier:__subpackages__",
],
)
Expand Down
19 changes: 14 additions & 5 deletions verifier/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ and policy invariants without writing Java code.

## Running the CLI Tool

### Standalone Executable (Prebuilt JAR)

You can download the standalone executable fat-JAR (`dev.cel:verifier-cli`)
directly from Maven Central and invoke it with `java -jar`:

<!-- disableFinding(LINE_OVER_80) -->
```bash
# Download the latest CLI JAR
curl -LO https://repo1.maven.org/maven2/dev/cel/verifier-cli/0.13.1/verifier-cli-0.13.1.jar

# Run the verifier CLI / REPL
java -jar verifier-cli-0.13.1.jar --help
```

### Running via Bazel

```bash
Expand All @@ -27,11 +41,6 @@ bazel run //verifier/tools:cel_verifier_tool -- \
bazel run //verifier/tools:cel_verifier_tool -- repl
```

### Running via Maven Central

> **Note:** Executable binaries and Maven packages (`dev.cel:cel-verifier`)
> will be published to Maven Central in an upcoming release.

## CLI Commands

* `check-sat --expr "..."`: Verifies satisfiability of an expression and
Expand Down
Loading