From 106b5080a1f40307317a4017039c2be91624de66 Mon Sep 17 00:00:00 2001 From: Duong Trong Duc Date: Fri, 13 Apr 2018 16:43:50 +0700 Subject: [PATCH 1/7] Change to use gom libaray to manage dependencies --- .gitignore | 1 + .travis.yml | 36 +++++++++++++++++++++++++++--------- Gomfile | 13 +++++++++++++ README.md | 13 +++++++------ 4 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 .gitignore create mode 100644 Gomfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..22d0d82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor diff --git a/.travis.yml b/.travis.yml index 17e786d..6732c9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,42 @@ language: go go: + - tip - 1.9.3 env: "PATH=/home/travis/gopath/bin:$PATH" before_install: - - go get github.com/kintone/go-kintone - - go get github.com/howeyc/gopass - - go get golang.org/x/text/encoding - - go get github.com/jessevdk/go-flags - - go get github.com/mitchellh/gox # get gox lib for building cross platform + - go get github.com/mattn/gom +script: script: - go vet -x ./... - - gox -osarch="linux/amd64" -output build/linux-x64/cli-kintone + # Install dependencies via gom + - $HOME/gopath/bin/gom -production install + - $HOME/gopath/bin/gom test + + # Build linux/amd64 archive + - export GOOS="linux" + - export GOARCH="amd64" + - gom build -v -tags "forceposix" -o build/linux-x64/cli-kintone - zip linux-x64.zip build/linux-x64/cli-kintone - - gox -osarch="darwin/amd64" -output build/macos-x64/cli-kintone + + # Build darwin/amd64 archive + - export GOOS="darwin" + - export GOARCH="amd64" + - gom build -v -tags "forceposix" -o build/macos-x64/cli-kintone - zip macos-x64.zip build/macos-x64/cli-kintone - - gox -osarch="windows/amd64" -tags "forceposix" -output build/windows-x64/cli-kintone + + # Build windows/amd64 archive + - export GOOS="windows" + - export GOARCH="amd64" + - gom build -v -tags "forceposix" -o build/windows-x64/cli-kintone - zip windows-x64.zip build/windows-x64/cli-kintone.exe - - gox -osarch="windows/386" -tags "forceposix" -output build/windows/cli-kintone + + # Build windows/386 archive + - export GOOS="windows" + - export GOARCH="386" + - gom build -v -tags "forceposix" -o build/windows/cli-kintone - zip windows.zip build/windows/cli-kintone.exe + deploy: provider: releases api_key: diff --git a/Gomfile b/Gomfile new file mode 100644 index 0000000..f212f01 --- /dev/null +++ b/Gomfile @@ -0,0 +1,13 @@ + gom 'golang.org/x/crypto' + gom 'golang.org/x/text' + +group :production do + gom 'github.com/kintone/go-kintone', :tag => 'v0.1.1' + gom 'github.com/howeyc/gopass', :commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' + gom 'github.com/jessevdk/go-flags', :tag => 'v1.4.0' +end +group :development do + gom 'github.com/kintone/go-kintone' + gom 'github.com/howeyc/gopass' + gom 'github.com/jessevdk/go-flags' +end \ No newline at end of file diff --git a/README.md b/README.md index 0ce1c21..5d83f9c 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,21 @@ cli-kintone is a command line utility for exporting and importing kintone App da Getting the source code + $ export GOPATH=/path/to/your/Go/project/folder $ cd ${GOPATH}/src $ git clone https://github.com/kintone/cli-kintone.git Install dependencies - $ go get github.com/kintone/go-kintone - $ go get github.com/howeyc/gopass - $ go get golang.org/x/text/encoding - $ go get github.com/jessevdk/go-flags + $ export GOPATH=/path/to/your/Go/project/folder + $ go get github.com/mattn/gom + $ sudo ln -s $GOPATH/bin/gom /usr/local/bin/gom + $ gom -production install build $ cd ${GOPATH}/src/cli-kintone - $ go build + $ gom build ## Downloads @@ -42,7 +43,7 @@ These binaries are available for download. https://github.com/kintone/cli-kintone/releases ## Usage -``` +```text Usage: cli-kintone [OPTIONS] From 07b0e875d4cda109efd6e0c9c0153bef81459b95 Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Fri, 13 Apr 2018 16:53:39 +0700 Subject: [PATCH 2/7] Update .travis.yml --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6732c9c..2c44e92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: go go: - - tip - 1.9.3 env: "PATH=/home/travis/gopath/bin:$PATH" before_install: @@ -11,7 +10,6 @@ script: - go vet -x ./... # Install dependencies via gom - $HOME/gopath/bin/gom -production install - - $HOME/gopath/bin/gom test # Build linux/amd64 archive - export GOOS="linux" @@ -29,13 +27,13 @@ script: - export GOOS="windows" - export GOARCH="amd64" - gom build -v -tags "forceposix" -o build/windows-x64/cli-kintone - - zip windows-x64.zip build/windows-x64/cli-kintone.exe + - zip windows-x64.zip build/windows-x64 # Build windows/386 archive - export GOOS="windows" - export GOARCH="386" - gom build -v -tags "forceposix" -o build/windows/cli-kintone - - zip windows.zip build/windows/cli-kintone.exe + - zip windows.zip build/windows deploy: provider: releases From 69bd41c04c2e7fb679b395bbd49ea2a74df810fb Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Fri, 13 Apr 2018 16:57:40 +0700 Subject: [PATCH 3/7] Update .travis.yml --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c44e92..0924d24 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,14 +26,14 @@ script: # Build windows/amd64 archive - export GOOS="windows" - export GOARCH="amd64" - - gom build -v -tags "forceposix" -o build/windows-x64/cli-kintone - - zip windows-x64.zip build/windows-x64 + - gom build -v -tags "forceposix" -o build/windows-x64/cli-kintone.exe + - zip windows-x64.zip build/windows-x64/cli-kintone.exe # Build windows/386 archive - export GOOS="windows" - export GOARCH="386" - - gom build -v -tags "forceposix" -o build/windows/cli-kintone - - zip windows.zip build/windows + - gom build -v -tags "forceposix" -o build/windows/cli-kintone.exe + - zip windows.zip build/windows/cli-kintone.exe deploy: provider: releases From ba6c90630b5267a404521701618dbc924c1146db Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Fri, 27 Apr 2018 14:13:40 +0700 Subject: [PATCH 4/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d83f9c..a95c63a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ cli-kintone is a command line utility for exporting and importing kintone App da ## Version -0.9.1 +0.9.2 ## How to Build From eec215b8f439012ebc1d97b96e07a99546ed43d7 Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Wed, 2 May 2018 13:50:36 +0700 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a95c63a..abaadc4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ cli-kintone is a command line utility for exporting and importing kintone App da ### Requirement -- Go 1.9.3 or later +- Go 1.9.3 - Git and Mercurial to be able to clone the packages Getting the source code From 6caf0cd8da6cf8824c826a60b80eebe19eeabebe Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Wed, 2 May 2018 14:11:15 +0700 Subject: [PATCH 6/7] Update dependencies version + golang.org/x/crypto: commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' + golang.org/x/text: commit => '613d6eafa307c6881a737a3c35c0e312e8d3a8c5' --- Gomfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Gomfile b/Gomfile index f212f01..7eb7141 100644 --- a/Gomfile +++ b/Gomfile @@ -1,13 +1,14 @@ - gom 'golang.org/x/crypto' - gom 'golang.org/x/text' - group :production do + gom 'golang.org/x/crypto', :commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' + gom 'golang.org/x/text', :commit => '613d6eafa307c6881a737a3c35c0e312e8d3a8c5' gom 'github.com/kintone/go-kintone', :tag => 'v0.1.1' gom 'github.com/howeyc/gopass', :commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' gom 'github.com/jessevdk/go-flags', :tag => 'v1.4.0' end group :development do - gom 'github.com/kintone/go-kintone' - gom 'github.com/howeyc/gopass' - gom 'github.com/jessevdk/go-flags' -end \ No newline at end of file + gom -u 'golang.org/x/crypto' + gom -u 'golang.org/x/text' + gom -u 'github.com/kintone/go-kintone' + gom -u 'github.com/howeyc/gopass' + gom -u 'github.com/jessevdk/go-flags' +end From 4746ac485c987639429340d619232f1cf4806154 Mon Sep 17 00:00:00 2001 From: dtduc91 Date: Wed, 2 May 2018 14:26:23 +0700 Subject: [PATCH 7/7] Update Gomfile --- Gomfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gomfile b/Gomfile index 7eb7141..1a1bbfe 100644 --- a/Gomfile +++ b/Gomfile @@ -1,6 +1,6 @@ group :production do - gom 'golang.org/x/crypto', :commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' - gom 'golang.org/x/text', :commit => '613d6eafa307c6881a737a3c35c0e312e8d3a8c5' + gom 'golang.org/x/crypto', :commit => '613d6eafa307c6881a737a3c35c0e312e8d3a8c5' + gom 'golang.org/x/text', :commit => '7922cc490dd5a7dbaa7fd5d6196b49db59ac042f' gom 'github.com/kintone/go-kintone', :tag => 'v0.1.1' gom 'github.com/howeyc/gopass', :commit => 'bf9dde6d0d2c004a008c27aaee91170c786f6db8' gom 'github.com/jessevdk/go-flags', :tag => 'v1.4.0'