Skip to content

Commit

Permalink
Merge pull request #68 from jorgerojas26/add-homebrew-tap
Browse files Browse the repository at this point in the history
Add homebrew tap
  • Loading branch information
jorgerojas26 authored Jul 10, 2024
2 parents f5cc69e + 722521d commit d68a380
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
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)

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

Archlinux 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

0 comments on commit d68a380

Please sign in to comment.