Skip to content

Commit

Permalink
feat: homebrew tap (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
notnmeyer authored Jan 12, 2024
1 parent e17c08f commit 02a89b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_REPO_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_REPO_GITHUB_TOKEN }}
24 changes: 18 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
before:
hooks:
- go mod tidy
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
Expand All @@ -22,16 +22,28 @@ archives:
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
name_template: checksums.txt

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
brews:
- name: daylog
homepage: https://github.com/notnmeyer/daylog-cli
description: Takes notes while you work in your editor of choice.
commit_author:
name: daylog-bot
email: [email protected]
repository:
owner: notnmeyer
name: homebrew-daylog-cli
token: "{{ .Env.HOMEBREW_TAP_REPO_GITHUB_TOKEN }}"
28 changes: 7 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,15 @@ Logs are stored in `$XDG_DATA_HOME/daylog`.

### Install a prebuilt binary

1. Get the URL for the desired version and platform from the [releases page](https://github.com/notnmeyer/daylog-cli/releases).
2. Download the release,
```
curl -LO https://github.com/notnmeyer/daylog-cli/releases/download/v0.0.3/daylog-cli_Darwin_arm64.tar.gz
```
or
```
wget https://github.com/notnmeyer/daylog-cli/releases/download/v0.0.3/daylog-cli_Darwin_arm64.tar.gz
```
4. Extract the tar file, `tar -xzvf daylog-cli_Darwin_arm64.tar.gz`.
5. Move the `daylog` binary where you want it—`mv daylog ~/bin`, `mv daylog /usr/local/bin/`, etc.
Or just copy and paste it all,
```shell
release_version=v0.0.3
installation_directory=~/bin/
cd $(mktemp -d)
curl -LO https://github.com/notnmeyer/daylog-cli/releases/download/$release_version/daylog-cli_Darwin_arm64.tar.gz
tar -xzvf daylog-cli_Darwin_arm64.tar.gz
mv daylog "$installation_directory"/
Via Homebrew,

```
brew tap notnmeyer/daylog-cli
brew install daylog
```

Or grab a release directly from the [releases page]()

### Install from source

1. Build the project with, `go build -o ~/bin/daylog main.go`, substituting `~/bin/daylog` for a different path if you prefer.
Expand Down

0 comments on commit 02a89b7

Please sign in to comment.