Skip to content

Commit

Permalink
Merge pull request #1 from XuechunHHH/add/partiql-cli
Browse files Browse the repository at this point in the history
Add partiql-cli and README
  • Loading branch information
XuechunHHH authored Jul 23, 2024
2 parents d1ecbc1 + fb79d81 commit 8906269
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 8 deletions.
47 changes: 39 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
## My Project

TODO: Fill this README out!

Be sure to:

* Change the title in this README
* Edit your repository description on GitHub
[![License](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/partiql/homebrew-partiql/blob/main/LICENSE)
[![Homebrew](https://img.shields.io/badge/Homebrew-Install-brightgreen.svg)](https://github.com/partiql/homebrew-partiql)
## Homebrew PartiQL

Welcome to the official Homebrew Tap for PartiQL applications.

This repository is managed by the [PartiQL](https://github.com/partiql) team and contains Homebrew formulas for easy installation and management of PartiQL owned applications on macOS and Linux systems.

### Installation
To tap this repository and make the formulas available on your system, run:

```bash
brew tap partiql/partiql
```

We currently publish one formula, [partiql-cli](https://github.com/partiql/partiql-lang-kotlin/wiki/Command-Line-Tutorial). It is an interactive shell, or Read Evaluate Print Loop (REPL), that allows users to write and evaluate PartiQL queries.
To install, run:
```
brew install partiql-cli
```
This command fetches and installs the latest version of `partiql-cli`, setting up all necessary dependencies on your macOS or Linux system.

### Usage
After installation, you can start using command:
```bash
partiql
```
For a comprehensive list of options and more detailed help, you can use the help command:
```
partiql --help
```
This will display usage information, command line options and guidance to help you get started.

### Uninstallation
To untap this repository and delete the formulas from your system, run:

```bash
brew untap partiql/partiql && brew uninstall partiql-cli
```

## Security

Expand Down
19 changes: 19 additions & 0 deletions partiql-cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class PartiqlCli < Formula
desc "PartiQL CLI."
homepage "https://partiql.org/"
url "https://github.com/partiql/partiql-lang-kotlin/releases/download/v0.14.5/partiql-cli-0.14.5.tgz"
sha256 "be7475d6a5dea877c7821f96a550d94fef6866e3522c15ed8c68e5eaf7f20328"
license "Apache-2.0"
depends_on "openjdk"

def install
libexec.install Dir["*"]
(bin/"partiql").write <<~EOS
#!/bin/bash
APP_HOME="#{libexec}"
CLASSPATH=$(echo $APP_HOME/lib/*.jar | tr ' ' ':')
JAVA_CMD="java"
exec "$JAVA_CMD" -classpath "$CLASSPATH" org.partiql.cli.Main "$@"
EOS
end
end

0 comments on commit 8906269

Please sign in to comment.