From 7022e8bb04c0dafa8e192eb717224c54189b365f Mon Sep 17 00:00:00 2001 From: jason-gao Date: Sun, 9 Jun 2019 17:29:45 +0800 Subject: [PATCH 01/10] add build shell --- build.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..ae20a6a --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +go build -o $GOPATH/bin/fileboy \ No newline at end of file From f4859b37d8627c24836127444a9aff22b313ceed Mon Sep 17 00:00:00 2001 From: jason-gao Date: Mon, 9 Dec 2019 16:47:40 +0800 Subject: [PATCH 02/10] add Makefile --- .gitignore | 2 +- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ mergeUpstream.sh | 7 +++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100755 mergeUpstream.sh diff --git a/.gitignore b/.gitignore index 6f02f8d..7be961f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ filegirl.yaml fileboy-darwin-amd64.bin fileboy-linux-amd64.bin fileboy-windows-amd64.exe - +./bin/* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5433b28 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +# notice +# Make is very picky about spaces vs. tabs. +# Command lines absolutely must be indented with a single tab, and not spaces. +# You may need to adjust your editor to generate tab characters. +# http://blog.chinaunix.net/uid/28458801/sid-171170-list-1.html + +# use: +# make build-mac 编译 +# make start-mac 启动 + +# make build-start-mac 编译+启动 +init: + go get gopkg.in/yaml.v2 + go get gopkg.in/fsnotify/fsnotify.v1 + +build-mac: ;@echo "编译-mac版"; + CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -ldflags "-s -w" -o ./bin/fileboy-darwin-amd64.bin + +build-linux: ;@echo "编译-linux版"; + CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags "-s -w" -o ./bin/fileboy-linux-amd64.bin + +build-win: ;@echo "编译-windows版"; + CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -ldflags "-s -w" -o ./bin/fileboy-windows-amd64.exe + +build-all: build-mac build-linux build-win + +start-linux: ;@echo "启动服务"; + ./bin/fileboy-linux-amd64.bin init + ./bin/fileboy-linux-amd64.bin + +start-mac: ;@echo "启动服务"; + ./bin/fileboy-darwin-amd64.bin init + ./bin/fileboy-darwin-amd64.bin + +start-win: ;@echo "启动服务"; + ./bin/fileboy-windows-amd64.exe init + ./bin/fileboy-windows-amd64.exe + +build-start-mac: build-mac start-mac + +.PHONY: build-mac build-linux build-win build-all start-linux start-mac start-win build-start-mac \ No newline at end of file diff --git a/mergeUpstream.sh b/mergeUpstream.sh new file mode 100755 index 0000000..15074e5 --- /dev/null +++ b/mergeUpstream.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# 合并上游-fork来源 +git remote add upstream https://github.com/dengsgo/fileboy.git +git fetch upstream +git checkout master +git merge upstream/master \ No newline at end of file From c61fac453d8099203ca602b8103b100a0bae96cb Mon Sep 17 00:00:00 2001 From: jason-gao <3048789891@qq.com> Date: Mon, 9 Dec 2019 17:40:25 +0800 Subject: [PATCH 03/10] update travis --- .travis.yml | 20 +++++++++++++------- Makefile | 6 ++++++ mergeUpstream.sh | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f21e1d..7c3459a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,17 @@ go: - 1.13.x - master -script: - - go build - - ./fileboy version - - ./fileboy help - - ./fileboy init - - cat filegirl.yaml - - ./fileboy exec + +notifications: + email: + recipients: + - 3048789891@qq.com + on_success: change # default: change + on_failure: always # default: always + + +script: + - make init + - make build-mac + - make start-mac diff --git a/Makefile b/Makefile index 5433b28..4ecba34 100644 --- a/Makefile +++ b/Makefile @@ -25,15 +25,21 @@ build-win: ;@echo "编译-windows版"; build-all: build-mac build-linux build-win start-linux: ;@echo "启动服务"; + ./bin/fileboy-linux-amd64.bin help ./bin/fileboy-linux-amd64.bin init + cat filegirl.yaml ./bin/fileboy-linux-amd64.bin start-mac: ;@echo "启动服务"; + ./bin/fileboy-darwin-amd64.bin help ./bin/fileboy-darwin-amd64.bin init + cat filegirl.yaml ./bin/fileboy-darwin-amd64.bin start-win: ;@echo "启动服务"; + ./bin/fileboy-windows-amd64.exe help ./bin/fileboy-windows-amd64.exe init + cat filegirl.yaml ./bin/fileboy-windows-amd64.exe build-start-mac: build-mac start-mac diff --git a/mergeUpstream.sh b/mergeUpstream.sh index 15074e5..926f648 100755 --- a/mergeUpstream.sh +++ b/mergeUpstream.sh @@ -4,4 +4,4 @@ git remote add upstream https://github.com/dengsgo/fileboy.git git fetch upstream git checkout master -git merge upstream/master \ No newline at end of file +git merge upstream/master From e4d9b74869ecee72b6c69ae571f8f67131720d0e Mon Sep 17 00:00:00 2001 From: jason-gao <3048789891@qq.com> Date: Mon, 9 Dec 2019 18:06:05 +0800 Subject: [PATCH 04/10] update --- .travis.yml | 5 +++-- Makefile | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c3459a..a4d117f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ notifications: script: - make init - - make build-mac - - make start-mac + - make build-linux + - ls bin + - make start-linux diff --git a/Makefile b/Makefile index 4ecba34..e95ac2d 100644 --- a/Makefile +++ b/Makefile @@ -27,19 +27,19 @@ build-all: build-mac build-linux build-win start-linux: ;@echo "启动服务"; ./bin/fileboy-linux-amd64.bin help ./bin/fileboy-linux-amd64.bin init - cat filegirl.yaml + ./bin/fileboy-linux-amd64.bin version ./bin/fileboy-linux-amd64.bin start-mac: ;@echo "启动服务"; ./bin/fileboy-darwin-amd64.bin help ./bin/fileboy-darwin-amd64.bin init - cat filegirl.yaml + ./bin/fileboy-darwin-amd64.bin version ./bin/fileboy-darwin-amd64.bin start-win: ;@echo "启动服务"; ./bin/fileboy-windows-amd64.exe help ./bin/fileboy-windows-amd64.exe init - cat filegirl.yaml + ./bin/fileboy-windows-amd64.exe version ./bin/fileboy-windows-amd64.exe build-start-mac: build-mac start-mac From 679ddba2d803ec7b74af1da020ad6b1f11ed1281 Mon Sep 17 00:00:00 2001 From: jason-gao <3048789891@qq.com> Date: Tue, 10 Dec 2019 14:15:33 +0800 Subject: [PATCH 05/10] update travis --- .travis.yml | 2 +- Makefile | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4d117f..bcff1d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,5 +18,5 @@ script: - make init - make build-linux - ls bin - - make start-linux + - make travis-linux diff --git a/Makefile b/Makefile index e95ac2d..49edda1 100644 --- a/Makefile +++ b/Makefile @@ -24,24 +24,22 @@ build-win: ;@echo "编译-windows版"; build-all: build-mac build-linux build-win -start-linux: ;@echo "启动服务"; - ./bin/fileboy-linux-amd64.bin help - ./bin/fileboy-linux-amd64.bin init - ./bin/fileboy-linux-amd64.bin version - ./bin/fileboy-linux-amd64.bin - start-mac: ;@echo "启动服务"; - ./bin/fileboy-darwin-amd64.bin help ./bin/fileboy-darwin-amd64.bin init - ./bin/fileboy-darwin-amd64.bin version ./bin/fileboy-darwin-amd64.bin +start-linux: ;@echo "启动服务"; + ./bin/fileboy-linux-amd64.bin init + ./bin/fileboy-linux-amd64.bin + +travis-linux: + ./bin/fileboy-linux-amd64.bin init + ./bin/fileboy-linux-amd64.bin exec + start-win: ;@echo "启动服务"; - ./bin/fileboy-windows-amd64.exe help ./bin/fileboy-windows-amd64.exe init - ./bin/fileboy-windows-amd64.exe version ./bin/fileboy-windows-amd64.exe build-start-mac: build-mac start-mac -.PHONY: build-mac build-linux build-win build-all start-linux start-mac start-win build-start-mac \ No newline at end of file +.PHONY: build-mac build-linux build-win build-all start-linux travis-linux start-mac start-win build-start-mac \ No newline at end of file From 7dd5b44ab694abb30bfc2bbf130101f7a7e5c4d9 Mon Sep 17 00:00:00 2001 From: "Deng.Liu" Date: Wed, 11 Dec 2019 16:13:25 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add -u flag --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 49edda1..26c0903 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ # make build-start-mac 编译+启动 init: - go get gopkg.in/yaml.v2 - go get gopkg.in/fsnotify/fsnotify.v1 + go get -u gopkg.in/yaml.v2 + go get -u gopkg.in/fsnotify/fsnotify.v1 build-mac: ;@echo "编译-mac版"; CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -ldflags "-s -w" -o ./bin/fileboy-darwin-amd64.bin @@ -42,4 +42,4 @@ start-win: ;@echo "启动服务"; build-start-mac: build-mac start-mac -.PHONY: build-mac build-linux build-win build-all start-linux travis-linux start-mac start-win build-start-mac \ No newline at end of file +.PHONY: build-mac build-linux build-win build-all start-linux travis-linux start-mac start-win build-start-mac From f912ccb753f4ae226dd3ed4840c1c7183cb684d1 Mon Sep 17 00:00:00 2001 From: "Deng.Liu" Date: Wed, 11 Dec 2019 16:13:47 +0800 Subject: [PATCH 07/10] Delete build.sh --- build.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 build.sh diff --git a/build.sh b/build.sh deleted file mode 100644 index ae20a6a..0000000 --- a/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -go build -o $GOPATH/bin/fileboy \ No newline at end of file From b5f068dd5573fb411d19c7754ab50616f723219a Mon Sep 17 00:00:00 2001 From: "Deng.Liu" Date: Wed, 11 Dec 2019 16:19:19 +0800 Subject: [PATCH 08/10] Update .travis.yml --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcff1d8..463cbc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,12 +6,7 @@ go: - master -notifications: - email: - recipients: - - 3048789891@qq.com - on_success: change # default: change - on_failure: always # default: always +dist: bionic # ubuntu 18.04 script: From 4f044b8ebfe8d149f836b99f1cd58f69918e1477 Mon Sep 17 00:00:00 2001 From: "Deng.Liu" Date: Wed, 11 Dec 2019 16:25:02 +0800 Subject: [PATCH 09/10] Update Makefile --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 26c0903..74bf0bc 100644 --- a/Makefile +++ b/Makefile @@ -32,10 +32,6 @@ start-linux: ;@echo "启动服务"; ./bin/fileboy-linux-amd64.bin init ./bin/fileboy-linux-amd64.bin -travis-linux: - ./bin/fileboy-linux-amd64.bin init - ./bin/fileboy-linux-amd64.bin exec - start-win: ;@echo "启动服务"; ./bin/fileboy-windows-amd64.exe init ./bin/fileboy-windows-amd64.exe From a3f5af69aec1641ec54e3b36adfb54045989bece Mon Sep 17 00:00:00 2001 From: "Deng.Liu" Date: Wed, 11 Dec 2019 16:29:22 +0800 Subject: [PATCH 10/10] Update .travis.yml --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 463cbc1..483cbc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,5 +13,9 @@ script: - make init - make build-linux - ls bin - - make travis-linux + - ./bin/fileboy-linux-amd64.bin version + - ./bin/fileboy-linux-amd64.bin help + - ./bin/fileboy-linux-amd64.bin init + - cat filegirl.yaml + - ./bin/fileboy-linux-amd64.bin exec