Skip to content
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
73 changes: 15 additions & 58 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,73 +16,32 @@ before:
- go generate ./...

builds:
- id: linux-amd64
binary: zing-{{ .Os }}-{{ .Arch }}
# main: ./main.go
- id: zing
main: ./main.go # your entrypoint
binary: zing # <-- SAME name everywhere
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
# ldflags:
# - "{{ .Env.LDFLAGS }}"
no_unique_dist_dir: true

- id: darwin-amd64
binary: zing-{{ .Os }}-{{ .Arch }}
# main: ./main.go
goos:
- darwin
goarch:
- amd64
# ldflags:
# - "{{ .Env.LDFLAGS }}"
no_unique_dist_dir: true
- id: darwin-arm64
binary: zing-{{ .Os }}-{{ .Arch }}
# main: ./main.go
goos:
- darwin
goarch:
- arm64 # M1, M2, M3, M4 all use this
# ldflags:
# - "{{ .Env.LDFLAGS }}"
no_unique_dist_dir: true

- id: windows-amd64
binary: zing-{{ .Os }}-{{ .Arch }}
# main: ./main.go
goos:
- windows
goarch:
- amd64
# ldflags:
# - -buildmode=exe
# - "{{ .Env.LDFLAGS }}"
- arm64
ignore:
- goos: windows
goarch: arm64
no_unique_dist_dir: true
# builds:
# - env:
# - CGO_ENABLED=0
# goos:
# - linux
# - windows
# - darwin


archives:
- id: default
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
# {{- if eq .Arch "amd64" }}x86_64
# name_template: >-
# {{ .ProjectName }}_
# {{- title .Os }}_
# {{- if eq .Arch "386" }}i386
# {{- else }}{{ .Arch }}{{ end }}
# {{- if .Arm }}v{{ .Arm }}{{ end }}
format: tar.gz
# standard template: project + version + os + arch
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
format: zip

changelog:
sort: asc
Expand All @@ -100,17 +59,15 @@ release:


homebrew_casks:
- name: zing # cask name (defaults to project_name if omitted)
- name: zing
binaries:
- zing # binary name inside the archive
- zing # <-- matches builds.binary

description: "Zing helps developers zing through repetitive commands."
homepage: "https://github.com/chuksgpfr/zing"

# Where to put the generated cask file in *this same* repo
directory: Casks

# Commit the cask to github.com/chuksgpfr/zing
repository:
owner: chuksgpfr
name: zing
Expand Down
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,16 @@ func main() {
}

}

func Zing() *zing.Services {
store, err := zing.NewStore("./zing-store")
if err != nil {
panic(err)
}

// defer store.Close()

service := zing.NewServices(store)

return service
}
20 changes: 9 additions & 11 deletions zing.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package main

import "github.com/chuksgpfr/zing/zing"
// func Zing() *zing.Services {
// store, err := zing.NewStore("./zing-store")
// if err != nil {
// panic(err)
// }

func Zing() *zing.Services {
store, err := zing.NewStore("./zing-store")
if err != nil {
panic(err)
}
// // defer store.Close()

// defer store.Close()
// service := zing.NewServices(store)

service := zing.NewServices(store)

return service
}
// return service
// }
Loading