2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,4 +5,4 @@ filegirl.yaml
|
|||||||
fileboy-darwin-amd64.bin
|
fileboy-darwin-amd64.bin
|
||||||
fileboy-linux-amd64.bin
|
fileboy-linux-amd64.bin
|
||||||
fileboy-windows-amd64.exe
|
fileboy-windows-amd64.exe
|
||||||
|
./bin/*
|
||||||
|
20
.travis.yml
20
.travis.yml
@@ -5,11 +5,17 @@ go:
|
|||||||
- 1.13.x
|
- 1.13.x
|
||||||
- master
|
- master
|
||||||
|
|
||||||
script:
|
|
||||||
- go build
|
dist: bionic # ubuntu 18.04
|
||||||
- ./fileboy version
|
|
||||||
- ./fileboy help
|
|
||||||
- ./fileboy init
|
script:
|
||||||
- cat filegirl.yaml
|
- make init
|
||||||
- ./fileboy exec
|
- make build-linux
|
||||||
|
- ls bin
|
||||||
|
- ./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
|
||||||
|
|
||||||
|
41
Makefile
Normal file
41
Makefile
Normal file
@@ -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 -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
|
||||||
|
|
||||||
|
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-mac: ;@echo "启动服务";
|
||||||
|
./bin/fileboy-darwin-amd64.bin init
|
||||||
|
./bin/fileboy-darwin-amd64.bin
|
||||||
|
|
||||||
|
start-linux: ;@echo "启动服务";
|
||||||
|
./bin/fileboy-linux-amd64.bin init
|
||||||
|
./bin/fileboy-linux-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 travis-linux start-mac start-win build-start-mac
|
7
mergeUpstream.sh
Executable file
7
mergeUpstream.sh
Executable file
@@ -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
|
Reference in New Issue
Block a user