Skip to content

Commit af9666e

Browse files
committed
- [*] use goreleaser
1 parent e50131a commit af9666e

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

.goreleaser.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
builds:
2+
-
3+
env:
4+
# - CGO_ENABLED=0
5+
goos:
6+
- linux
7+
- darwin
8+
- windows
9+
goarch:
10+
- 386
11+
- amd64
12+
# List of combinations of GOOS + GOARCH + GOARM to ignore.
13+
# Default is empty.
14+
ignore:
15+
- goos: darwin
16+
goarch: 386
17+
- goos: windows
18+
goarch: 386
19+
20+
archive:
21+
name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}'
22+
replacements:
23+
darwin: Darwin
24+
linux: Linux
25+
windows: Windows
26+
386: i386
27+
amd64: x86_64
28+
format_overrides:
29+
- goos: windows
30+
format: zip
31+
32+
fpm:
33+
homepage: https://github.com/go-jsonfile/jsonfiddle
34+
description: JSON Fiddling, to look at the JSON data from different aspects.
35+
maintainer: Tong Sun <suntong@cpan.org>
36+
license: MIT
37+
vendor: suntong
38+
formats:
39+
- deb
40+
- rpm
41+
dependencies:
42+
- git
43+

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
language: go
2+
3+
install:
4+
- gem install fpm
5+
6+
after_success:
7+
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
8+

jsonfiddleCLIDef.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type rootT struct {
2727

2828
var root = &cli.Command{
2929
Name: "jsonfiddle",
30-
Desc: "JSON Fiddling\nbuilt on " + buildTime,
30+
Desc: "JSON Fiddling\nbuilt on " + date,
3131
Text: "Tool to fiddle with json strings",
3232
Global: true,
3333
Argv: func() interface{} { return new(rootT) },
@@ -43,7 +43,7 @@ var root = &cli.Command{
4343
// var (
4444
// progname = "jsonfiddle"
4545
// VERSION = "0.1.0"
46-
// buildTime = "2017-07-16"
46+
// date = "2017-07-16"
4747
// )
4848

4949
// var rootArgv *rootT

jsonfiddleMain.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ type OptsT struct {
3232

3333
var (
3434
progname = "jsonfiddle"
35-
// VERSION tracks the release version.
36-
VERSION = "0.2.0"
37-
buildTime = "2017-07-13"
35+
// version tracks the release version.
36+
version = "v0.2.0"
37+
date = "2017-07-13"
3838
)
3939

4040
var (

0 commit comments

Comments
 (0)