-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change module to github.com/ivanfetch/jkl, add GoReleaser and Makefil…
…e, update Go to 1.18
- Loading branch information
Showing
15 changed files
with
119 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
jkl | ||
dist/ | ||
stories.md | ||
notes.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
brews: | ||
- name: jkl | ||
# Do not update our tap repo if the git tag indicates prerelease. E.G. 1.0.0-rc1 | ||
skip_upload: auto | ||
goarm: 6 | ||
tap: | ||
owner: ivanfetch | ||
name: homebrew-jkl | ||
homepage: https://github.com/ivanfetch/jkl | ||
description: JKL is a version manager for other command-line tools. It installs tools quickly with minimal input, and helps you switch versions of tools while you work. | ||
caveats: You will need to add the jkl shims directory (default ~/.jkl/bin) to your PATH. | ||
test: | | ||
system "#{bin}/jkl version" | ||
builds: | ||
- ldflags: | ||
- -X github.com/ivanfetch/jkl.Version={{.Version}} -X github.com/ivanfetch/jkl.GitCommit={{.Commit}} -s -w | ||
env: | ||
- CGO_ENABLED=0 | ||
main: ./cmd/jkl | ||
# goreleaser builds a matrix of the GOOS, GOArch, and GOARM listed below, | ||
# minus those under `ignore`. | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
goos: | ||
- linux | ||
- darwin | ||
# windows not yet tested | ||
goarm: | ||
- 6 | ||
- 7 | ||
ignore: | ||
- goos: windows | ||
goarch: arm64 | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
BINARY=jkl | ||
VERSION= $(shell (git describe --tags --dirty 2>/dev/null || echo dev) |cut -dv -f2) | ||
GIT_COMMIT=$(shell git rev-parse HEAD) | ||
LDFLAGS="-s -w -X github.com/ivanfetch/jkl.Version=$(VERSION) -X github.com/ivanfetch/jkl.GitCommit=$(GIT_COMMIT)" | ||
|
||
all: build | ||
|
||
.PHONY: fmt | ||
fmt: | ||
go fmt ./... | ||
|
||
.PHONY: vet | ||
vet:go.sum | ||
go vet ./... | ||
|
||
go.sum:go.mod | ||
go get -t github.com/ivanfetch/jkl | ||
|
||
.PHONY: test | ||
test:go.sum | ||
go test ./... | ||
|
||
.PHONY: integrationtest | ||
integrationtest:go.sum | ||
go test -tags integration ./... | ||
|
||
.PHONY: binary | ||
binary:go.sum | ||
go build -ldflags $(LDFLAGS) -o $(BINARY) cmd/jkl/main.go | ||
|
||
.PHONY: build | ||
build: fmt vet test binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ package main | |
|
||
import ( | ||
"fmt" | ||
"jkl" | ||
"os" | ||
|
||
"github.com/ivanfetch/jkl" | ||
) | ||
|
||
func main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
module jkl | ||
module github.com/ivanfetch/jkl | ||
|
||
replace github.com/ivanfetch/jkl => ./ | ||
|
||
go 1.17 | ||
go 1.18 | ||
|
||
require github.com/spf13/pflag v1.0.5 | ||
require ( | ||
github.com/google/go-cmp v0.5.7 | ||
github.com/h2non/filetype v1.1.3 | ||
github.com/hashicorp/go-version v1.6.0 | ||
github.com/mitchellh/go-homedir v1.1.0 | ||
github.com/spf13/cobra v1.5.0 | ||
) | ||
|
||
require ( | ||
github.com/google/go-cmp v0.5.7 // indirect | ||
github.com/h2non/filetype v1.1.3 // indirect | ||
github.com/hashicorp/go-version v1.6.0 // indirect | ||
github.com/inconshreveable/mousetrap v1.0.0 // indirect | ||
github.com/ivanfetch/jkl v0.0.0-00010101000000-000000000000 // indirect | ||
github.com/mitchellh/go-homedir v1.1.0 // indirect | ||
github.com/spf13/cobra v1.5.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ package jkl_test | |
|
||
import ( | ||
"fmt" | ||
"github.com/ivanfetch/jkl" | ||
"io/fs" | ||
"jkl" | ||
"os" | ||
"sort" | ||
"testing" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
package jkl_test | ||
|
||
import ( | ||
"jkl" | ||
"os" | ||
"testing" | ||
|
||
"github.com/ivanfetch/jkl" | ||
|
||
"github.com/google/go-cmp/cmp" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
package jkl | ||
|
||
// This file is created by the release process. | ||
|
||
var Version string = "0.1.0" | ||
var Version string = "dev" | ||
var GitCommit string = "unknown" |