Skip to content

Commit ae181e6

Browse files
committed
Last changes for releases
1 parent 3fb5535 commit ae181e6

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

.goreleaser.yml

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1+
env:
2+
- GO111MODULE=on
3+
- CGO_ENABLED=0
4+
before:
5+
hooks:
6+
- go mod tidy
17
builds:
28
- main: ./cmd/repl/
3-
env:
4-
- CGO_ENABLED=0
9+
ldflags:
10+
- "-s -w"
511
goos:
612
- darwin
13+
- freebsd
714
- linux
15+
- openbsd
816
- windows
9-
goarch:
10-
- 386
11-
- amd64
12-
- arm
13-
- arm64
14-
goarm:
15-
- 6
16-
- 7
17-
ignore:
18-
- goos: darwin
19-
goarch: 386
20-
- goos: darwin
21-
goarch: arm
17+
18+
archives:
19+
- format: tar.gz
20+
format_overrides:
2221
- goos: windows
23-
goarch: 386
24-
- goos: windows
25-
goarch: arm
22+
format: zip
23+
replacements:
24+
darwin: macOS
25+
linux: Linux
26+
windows: Windows
27+
386: i386
28+
amd64: x86_64
29+
wrap_in_directory: true
30+
31+
snapshot:
32+
name_template: "{{ .Tag }}-next"
2633
changelog:
27-
sort: desc
34+
sort: asc
2835
brews:
2936
- name: repl-go
3037
tap:

go.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
21
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
32
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
43
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
5-
github.com/peterh/liner v1.1.0 h1:f+aAedNJA6uk7+6rXsYBnhdo4Xux7ESLe+kcuVUF5os=
6-
github.com/peterh/liner v1.1.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
74
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
85
github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI=
96
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=

repl.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
var (
1818
cmd string
1919
debug bool
20-
compDir string = os.Getenv("HOME") + "/.repl"
21-
histDir string = os.Getenv("HOME")
20+
compDir string
21+
histDir string
2222
histFile string
2323
)
2424

@@ -60,9 +60,10 @@ func Run() {
6060
}
6161

6262
func parseFlags() {
63+
homeDir := os.Getenv(("HOME"))
6364
flag.BoolVar(&debug, "debug", false, "Enable debug output")
64-
flag.StringVar(&compDir, "compdir", compDir, "Directory for completion files")
65-
flag.StringVar(&histDir, "histdir", histDir, "Directory for history file")
65+
flag.StringVar(&compDir, "compdir", homeDir+"/.repl", "Directory for completion files")
66+
flag.StringVar(&histDir, "histdir", homeDir, "Directory for history file")
6667
flag.Parse()
6768

6869
cmd = flag.Arg(0)

0 commit comments

Comments
 (0)