Skip to content

Commit

Permalink
support m1 mac using universal build
Browse files Browse the repository at this point in the history
  • Loading branch information
konoui committed Mar 2, 2021
1 parent 02d43b5 commit fa0c3a6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v2
with:
go-version: 1.14.x
go-version: 1.16.x
- name: checkout
uses: actions/checkout@v2
- name: lint
Expand All @@ -31,7 +31,7 @@ jobs:
- name: set up go
uses: actions/setup-go@v2
with:
go-version: 1.14.x
go-version: 1.16.x
- name: checkout
uses: actions/checkout@v2
with:
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ VERSION := $(shell git describe --tags --abbrev=0)
REVISION := $(shell git rev-parse --short HEAD)
SRC_DIR := ./
BIN_NAME := alfred-bookmarks
BINARY := bin/$(BIN_NAME)
BIN_DIR := bin
BINARY := $(BIN_DIR)/$(BIN_NAME)
ASSETS_DIR := assets
ASSETS := $(ASSETS_DIR)/* $(BINARY) README.md
ARTIFACT_DIR := .artifact
Expand Down Expand Up @@ -30,7 +31,9 @@ lint:

## Build macos binaries
darwin:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "${LDFLAGS} -s -w" -o $(BINARY) $(SRC_DIR)
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS) -s -w" -o $(BIN_DIR)/amd64 $(SRC_DIR)
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "$(LDFLAGS) -s -w" -o $(BIN_DIR)/arm64 $(SRC_DIR)
lipo -create $(BIN_DIR)/amd64 $(BIN_DIR)/arm64 -output $(BINARY)

## Run tests for my project
test:
Expand All @@ -53,7 +56,7 @@ release: package

## Clean Binary
clean:
rm -f $(BIN_NAME)
rm -f $(BIN_DIR)/*
rm -f $(ARTIFACT_DIR)/*

docker-test:
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
![Generic badge](https://github.com/konoui/alfred-bookmarks/workflows/test/badge.svg)

## alfred bookmarks

The workflow is a cross-browser bookmark searcher across Firefox, Google Chrome and Safari.

## Install

- Download and open the workflow with terminal.

```
$ curl -O -L https://github.com/konoui/alfred-bookmarks/releases/latest/download/alfred-bookmarks.alfredworkflow && open alfred-bookmarks.alfredworkflow
```

- Build the workflow on your computer.

```
$ make package
$ ls
alfred-bookmarks.alfredworkflow (snip)
```

## Usage

Please type `bs <query>` and select your desired bookmark to open on default web browser.

![alfred-bookmarks](./alfred-bookmarks.gif)

## Customize Configuration

Please create configuration file as `.alfred-bookmarks.yaml` in home directory (`~/`) if you want to customize.

```
firefox:
enable: true
Expand All @@ -37,17 +45,25 @@ remove_duplicates: true
If the configuration file does not exists, the workflow try to use available bookmark files of web browsers.

## Feature

- Supports fuzzy search.
- Supports following web browsers.
- Firefox
- Google Chrome
- Safari
- Supports filter by folder name.
- `-f` option. e.g) `bs -f <folder-name> <query>`
- Firefox
- Google Chrome
- Safari
- Supports options
- filter by folder name.
- e.g. `bs -f <folder-name> <query>`
- clear cache data.
- e.g. `bs --clear <query>`

## Limitation
### Firefox

### Firefox

The workflow reads latest bookmark data from `~/Library/Application Support/Firefox/Profiles/<xxxxx>.default/bookmarkbackups/` directory.
If you register a web site to bookmarks, the workflow does not search the web site immediately.

## License

MIT License.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/konoui/alfred-bookmarks

go 1.14
go 1.16

require (
github.com/frioux/leatherman v0.0.0-20200721002700-06899856e483
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down

0 comments on commit fa0c3a6

Please sign in to comment.