Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
兼容新版 Surge 的配置文件 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1024 authored and huacnlee committed Jun 26, 2017
1 parent 1f1626a commit 1ff4f13
Show file tree
Hide file tree
Showing 8 changed files with 1,167 additions and 269 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ flora-kit
*.log
release/
*.tar.*
.idea
37 changes: 23 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
RELEASE_PATH = release/flora/
RELEASE_PATH = release
PACKAGE_PATH = release/flora

install:
@go get
build:
GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o release/flora-kit-darwin-amd64
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o release/flora-kit-linux-amd64
GOOS=linux GOARCH=386 go build -ldflags "-s -w" -o release/flora-kit-linux-386
GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o $(RELEASE_PATH)/flora-darwin-amd64
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o $(RELEASE_PATH)/flora-amd64
GOOS=linux GOARCH=386 go build -ldflags "-s -w" -o $(RELEASE_PATH)/flora-386
GOOS=windows GOARCH=386 go build -ldflags "-s -w" -o $(RELEASE_PATH)/flora-386.exe
GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o $(RELEASE_PATH)/flora-amd64.exe
package:
rm -Rf $(RELEASE_PATH)/*
mkdir -p $(RELEASE_PATH)
cp ./flora.default.conf $(RELEASE_PATH)
cp ./geoip.mmdb $(RELEASE_PATH)
rm -Rf $(PACKAGE_PATH)/*
mkdir -p $(PACKAGE_PATH)
cp ./flora.default.conf $(PACKAGE_PATH)
cp ./geoip.mmdb $(PACKAGE_PATH)
cp ./LICENSE $(RELEASE_PATH)
cp ./README.md $(RELEASE_PATH)
cp ./README.md $(PACKAGE_PATH)
# macOS
cp ./release/flora-kit-darwin-amd64 $(RELEASE_PATH)flora
cp ./release/flora-darwin-amd64 $(PACKAGE_PATH)
cd ./release && zip flora-darwin-amd64.zip flora
# Linux amd64
cp ./release/flora-kit-linux-amd64 $(RELEASE_PATH)flora
cp ./release/flora-amd64 $(PACKAGE_PATH)flora
cd ./release && tar zcf flora-linux-amd64.tar.gz flora
# Linux 386
cp ./release/flora-kit-linux-386 $(RELEASE_PATH)flora
cp ./release/flora-386 $(PACKAGE_PATH)
cd ./release && tar zcf flora-linux-386.tar.gz flora
# Windows 386
#cp ./release/flora-386.exe $(PACKAGE_PATH)
#cd ./release && tar zcf flora-win-386.tar.gz flora
# Windows amd64
#cp ./release/flora-amd64.exe $(PACKAGE_PATH)
#cd ./release && tar zcf flora-win-amd64.tar.gz flora
# remove history
rm $(RELEASE_PATH)flora
rm $(PACKAGE_PATH)flora
run:
@go run main.go
test:
@go test ./flora
@go test ./flora
Loading

0 comments on commit 1ff4f13

Please sign in to comment.