mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
add releasing configs
This commit is contained in:
parent
f7ff98c747
commit
2d13382c68
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -76,3 +76,4 @@ crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
|
|
||||||
test_data
|
test_data
|
||||||
|
build
|
||||||
|
|
15
.travis.yml
15
.travis.yml
|
@ -13,3 +13,18 @@ install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test ./weed/...
|
- go test ./weed/...
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key:
|
||||||
|
secure: ERL986+ncQ8lwAJUYDrQ8s2/FxF/cyNIwJIFCqspnWxQgGNNyokET9HapmlPSxjpFRF0q6L2WCg9OY3mSVRq4oI6hg1igOQ12KlLyN71XSJ3c8w0Ay5ho48TQ9l3f3Iu97mntBCe9l0R9pnT8wj1VI8YJxloXwUMG2yeTjA9aBI=
|
||||||
|
file:
|
||||||
|
- build/linux_arm.tar.gz
|
||||||
|
- build/linux_arm64.tar.gz
|
||||||
|
- build/linux_386.tar.gz
|
||||||
|
- build/linux_amd64.tar.gz
|
||||||
|
- build/darwin_amd64.tar.gz
|
||||||
|
- build/windows_386.zip
|
||||||
|
- build/windows_amd64.zip
|
||||||
|
on:
|
||||||
|
repo: chrislusf/seaweedfs
|
||||||
|
|
52
Makefile
52
Makefile
|
@ -1,15 +1,26 @@
|
||||||
BINARY = weed/weed
|
BINARY = weed/weed
|
||||||
|
package = github.com/chrislusf/seaweedfs/weed
|
||||||
|
|
||||||
GO_FLAGS = #-v
|
GO_FLAGS = #-v
|
||||||
SOURCE_DIR = ./weed/
|
SOURCE_DIR = ./weed/
|
||||||
|
|
||||||
|
appname := weed
|
||||||
|
|
||||||
|
sources := $(wildcard *.go)
|
||||||
|
|
||||||
|
build = GOOS=$(1) GOARCH=$(2) go build -o build/$(appname)$(3) $(SOURCE_DIR)
|
||||||
|
tar = cd build && tar -cvzf $(1)_$(2).tar.gz $(appname)$(3) && rm $(appname)$(3)
|
||||||
|
zip = cd build && zip $(1)_$(2).zip $(appname)$(3) && rm $(appname)$(3)
|
||||||
|
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
.PHONY : clean deps build linux
|
.PHONY : clean deps build linux release windows_build darwin_build linux_build clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
go clean -i $(GO_FLAGS) $(SOURCE_DIR)
|
go clean -i $(GO_FLAGS) $(SOURCE_DIR)
|
||||||
rm -f $(BINARY)
|
rm -f $(BINARY)
|
||||||
|
rm -rf build/
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get $(GO_FLAGS) -d $(SOURCE_DIR)
|
go get $(GO_FLAGS) -d $(SOURCE_DIR)
|
||||||
|
@ -20,3 +31,42 @@ build: deps
|
||||||
linux: deps
|
linux: deps
|
||||||
mkdir -p linux
|
mkdir -p linux
|
||||||
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR)
|
GOOS=linux GOARCH=amd64 go build $(GO_FLAGS) -o linux/$(BINARY) $(SOURCE_DIR)
|
||||||
|
|
||||||
|
release: windows_build darwin_build linux_build
|
||||||
|
|
||||||
|
##### LINUX BUILDS #####
|
||||||
|
linux_build: build/linux_arm.tar.gz build/linux_arm64.tar.gz build/linux_386.tar.gz build/linux_amd64.tar.gz
|
||||||
|
|
||||||
|
build/linux_386.tar.gz: $(sources)
|
||||||
|
$(call build,linux,386,)
|
||||||
|
$(call tar,linux,386)
|
||||||
|
|
||||||
|
build/linux_amd64.tar.gz: $(sources)
|
||||||
|
$(call build,linux,amd64,)
|
||||||
|
$(call tar,linux,amd64)
|
||||||
|
|
||||||
|
build/linux_arm.tar.gz: $(sources)
|
||||||
|
$(call build,linux,arm,)
|
||||||
|
$(call tar,linux,arm)
|
||||||
|
|
||||||
|
build/linux_arm64.tar.gz: $(sources)
|
||||||
|
$(call build,linux,arm64,)
|
||||||
|
$(call tar,linux,arm64)
|
||||||
|
|
||||||
|
##### DARWIN (MAC) BUILDS #####
|
||||||
|
darwin_build: build/darwin_amd64.tar.gz
|
||||||
|
|
||||||
|
build/darwin_amd64.tar.gz: $(sources)
|
||||||
|
$(call build,darwin,amd64,)
|
||||||
|
$(call tar,darwin,amd64)
|
||||||
|
|
||||||
|
##### WINDOWS BUILDS #####
|
||||||
|
windows_build: build/windows_386.zip build/windows_amd64.zip
|
||||||
|
|
||||||
|
build/windows_386.zip: $(sources)
|
||||||
|
$(call build,windows,386,.exe)
|
||||||
|
$(call zip,windows,386,.exe)
|
||||||
|
|
||||||
|
build/windows_amd64.zip: $(sources)
|
||||||
|
$(call build,windows,amd64,.exe)
|
||||||
|
$(call zip,windows,amd64,.exe)
|
Loading…
Reference in a new issue