Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add homebrew tap #68

Merged
merged 8 commits into from
Jul 10, 2024
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
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
11 changes: 10 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1
version: 2

before:
hooks:
Expand Down Expand Up @@ -44,3 +44,12 @@ changelog:
exclude:
- "^docs:"
- "^test:"
brews:
-
name: lazysql
homepage: https://github.com/jorgerojas26/lazysql
repository:
owner: jorgerojas26
name: homebrew-lazysql
test: |
system "#{bin}/lazysql version"
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,24 @@ I use Lazysql daily in my ful time job as a fullstack javascript developer in it

### Installation

#### Binary Releases
#### Homebrew

For Windows, Mac OS or Linux, you can download a binary release [here](https://github.com/jorgerojas26/lazysql/releases)
```bash
brew tap jorgerojas26/lazysql
brew install lazysql
```

#### Install with go package manager

```bash
go install github.com/jorgerojas26/lazysql@latest
```

#### Install from package manager
#### Binary Releases

For Windows, Mac OS or Linux, you can download a binary release [here](https://github.com/jorgerojas26/lazysql/releases)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For Windows, Mac OS or Linux, you can download a binary release [here](https://github.com/jorgerojas26/lazysql/releases)
For Windows, macOS or Linux, you can download a binary release [here](https://github.com/jorgerojas26/lazysql/releases)


#### Third party (maintained by the community)

Archlinux users can install it from the AUR with:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Archlinux users can install it from the AUR with:
Arch Linux users can install it from the AUR with:


Expand Down
14 changes: 14 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,30 @@ package main
import (
"io"
"log"
"os"

"github.com/jorgerojas26/lazysql/app"
"github.com/jorgerojas26/lazysql/components"

"github.com/go-sql-driver/mysql"
)

var version = "dev"

func main() {
mysql.SetLogger(log.New(io.Discard, "", 0))

// check if "version" arg is passed
argsWithProg := os.Args

if len(argsWithProg) > 1 {
switch argsWithProg[1] {
case "version":
println("LazySQL version: ", version)
os.Exit(0)
}
}

if err := app.App.
SetRoot(components.MainPages, true).
EnableMouse(true).
Expand Down