Skip to content

Commit

Permalink
move gls.go into cmd/gls
Browse files Browse the repository at this point in the history
  • Loading branch information
ozansz committed Mar 7, 2024
1 parent 7334776 commit f9fa995
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
go-version: 1.19

- name: Build binaries
run: go build -v ./... && go build -v cmd/gls.go
run: go build -v ./... && go build -v cmd/gls/main.go

- name: Prepare directories for .deb packaging
run: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
go.work

## Custom
gls
gls.out
test/
*.test
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ before:
builds:
- env:
- CGO_ENABLED=0
main: ./cmd/gls.go
main: ./cmd/gls/main.go
binary: gls
goos:
- linux
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git clone git@github.com:<your-username>/gls.git

```bash
cd gls
go build cmd/gls.go
go build cmd/gls/main.go
```

## Contribution Flow
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@ It’s `ls` + `du` + `tree` with interactive TUI on your terminal! `gls` is crea

## Installation

### From Go package

Simply run:

```bash
go install go.sazak.io/gls/cmd/gls@latest
```

### From Source Code

Installing `gls` on your machine with the source code is pretty simple: just clone the repo and install `cmd/gls.go`:
Installing `gls` on your machine with the source code is pretty simple: just clone the repo and install `cmd/gls/main.go`:

```bash
$ git clone https://github.com/ozansz/gls
$ cd gls
$ go install ./cmd/gls.go
$ go install ./cmd/gls/main.go
```

After you run `go install` command, an executable file name `gls` is created in `$GOPATH/bin`. Now, you can simply run `gls` in terminal:
Expand All @@ -51,7 +59,7 @@ You can apply the similar procedure in PowerShell shown in the [From Source Code
```powershell
> git clone https://github.com/ozansz/gls
> cd .\gls\
> go install -v .\cmd\gls.go
> go install -v .\cmd\gls\main.go
```
Now, you can use `gls` in all directories.

Expand Down Expand Up @@ -120,7 +128,7 @@ You can freely change the key bindings and shortcuts or configure the program fo
After your changes, run

```bash
go build cmd/gls.go
go build cmd/gls/main.go
```
in the project directory.

Expand Down
File renamed without changes.
Binary file added gls
Binary file not shown.

0 comments on commit f9fa995

Please sign in to comment.