File tree 6 files changed +84
-46
lines changed
6 files changed +84
-46
lines changed Original file line number Diff line number Diff line change 5
5
- image : circleci/golang:latest
6
6
steps :
7
7
- checkout
8
- - run : go get -v -t -d ./...
9
8
- run : go test -v ./
10
9
- run : go test -v ./cmd/jid
11
- build :
10
+ release :
12
11
docker :
13
12
- image : circleci/golang:latest
14
13
steps :
15
14
- checkout
16
15
- run :
17
- name : update packages
18
- command : go get -v -t -d ./...
19
- - run :
20
- name : install gox
21
- command : go get github.com/mitchellh/gox
22
- - run :
23
- name : build jid
24
- command : cd cmd/jid && gox -ldflags '-w -s'
25
- - persist_to_workspace :
26
- root : .
27
- paths :
28
- - cmd/jid/*
29
- deploy :
30
- docker :
31
- - image : circleci/golang:latest
32
- steps :
33
- - attach_workspace :
34
- at : .
35
- - run :
36
- name : make a zip dir
37
- command : mkdir builds
38
- - run :
39
- name : create zip files
40
- command : |
41
- for name in `cd cmd/jid && find jid_* | grep -v .go`; do
42
- zip builds/${name}.zip cmd/jid/$name
43
- done
44
- - run :
45
- name : list binary
46
- command : ls builds
16
+ name : build jid using goreleaser
17
+ command : curl -sL https://git.io/goreleaser | bash
47
18
workflows :
48
19
version : 2
49
- build_and_deploy :
20
+ test_and_release :
50
21
jobs :
51
22
- test
52
- - build :
23
+ - release :
53
24
requires :
54
25
- test
55
- # filters:
56
- # tags:
57
- # only: /.*/
58
- - deploy :
59
- requires :
60
- - build
61
- # filters:
62
- # tags:
63
- # only: /.*/
64
- # branches:
65
- # only: master
26
+ filters :
27
+ branches :
28
+ ignore : /.*/
29
+ tags :
30
+ only : /v[0-9]+(\.[0-9]+)*(-.*)*/
Original file line number Diff line number Diff line change 29
29
# jid package
30
30
jid
31
31
* .out
32
+ * .log
33
+ dist
Original file line number Diff line number Diff line change
1
+ # This is an example goreleaser.yaml file with some sane defaults.
2
+ # Make sure to check the documentation at http://goreleaser.com
3
+ before :
4
+ hooks :
5
+ # you may remove this if you don't use vgo
6
+ - go mod download
7
+ # you may remove this if you don't need go generate
8
+ - go generate ./...
9
+ builds :
10
+ - env :
11
+ - CGO_ENABLED=0
12
+ main : ./cmd/jid/jid.go
13
+ ldflags :
14
+ - -s -w
15
+ goos :
16
+ - windows
17
+ - openbsd
18
+ - netbsd
19
+ - linux
20
+ - freebsd
21
+ - darwin
22
+ goarch :
23
+ - arm64
24
+ - amd64
25
+ - 386
26
+ archive :
27
+ name_template : " {{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
28
+ format : zip
29
+ files :
30
+ - none*
31
+ checksum :
32
+ name_template : ' checksums.txt'
33
+ snapshot :
34
+ name_template : " {{ .Tag }}-next"
35
+ changelog :
36
+ sort : asc
37
+ filters :
38
+ exclude :
39
+ - ' ^docs:'
40
+ - ' ^test:'
41
+ # for Validation
42
+ # release:
43
+ # disable: true
Original file line number Diff line number Diff line change 8
8
"github.com/simeji/jid"
9
9
)
10
10
11
- const VERSION = "0.7.2 "
11
+ const VERSION = "0.7.3 "
12
12
13
13
func main () {
14
14
content := os .Stdin
Original file line number Diff line number Diff line change
1
+ module github.com/simeji/jid
2
+
3
+ require (
4
+ github.com/bitly/go-simplejson v0.5.0
5
+ github.com/fatih/color v1.7.0 // indirect
6
+ github.com/mattn/go-colorable v0.0.9 // indirect
7
+ github.com/mattn/go-isatty v0.0.4 // indirect
8
+ github.com/mattn/go-runewidth v0.0.4
9
+ github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed
10
+ github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5
11
+ github.com/pkg/errors v0.8.0
12
+ )
Original file line number Diff line number Diff line change
1
+ github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y =
2
+ github.com/bitly/go-simplejson v0.5.0 /go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA =
3
+ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys =
4
+ github.com/fatih/color v1.7.0 /go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4 =
5
+ github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4 =
6
+ github.com/mattn/go-colorable v0.0.9 /go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU =
7
+ github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs =
8
+ github.com/mattn/go-isatty v0.0.4 /go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4 =
9
+ github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y =
10
+ github.com/mattn/go-runewidth v0.0.4 /go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU =
11
+ github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed h1:bAVGG6B+R5qpSylrrA+BAMrzYkdAoiTaKPVxRB+4cyM =
12
+ github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed /go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ =
13
+ github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5 h1:d+C3xJdxZT7wNlxqEwbXn3R355CwAhYBL9raVNfSnK0 =
14
+ github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5 /go.mod h1:GYFm0zZgTNeoK1QxuIofRDasy2ibmaJZhZLzwsMXUF4 =
15
+ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw =
16
+ github.com/pkg/errors v0.8.0 /go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0 =
You can’t perform that action at this time.
0 commit comments