From 54fa548a44556133a0232dc39ebb32a3a35b7f27 Mon Sep 17 00:00:00 2001 From: xiaomeng79 <496096100@qq.com> Date: Wed, 9 Oct 2019 15:25:34 +0800 Subject: [PATCH] =?UTF-8?q?goreleaser=E7=BC=96=E8=AF=91=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++++- .goreleaser.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- scripts/install.sh | 2 +- 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .goreleaser.yml diff --git a/.gitignore b/.gitignore index ffd6386..283d562 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,7 @@ vendor check.log *.pid -*/myvariables.sh \ No newline at end of file +*/myvariables.sh + +# 编译目录 +dist \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..6566cd5 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,42 @@ +builds: +- binary: srv-account + main: ./cmd/srv/account.go + goos: +# - windows + - darwin + - linux + - freebsd + goarch: + - amd64 + - 386 + - arm + - arm64 + goarm: + - 6 + - 7 +#- binary: srv-user +# main: ./cmd/srv/user.go +# goos: +# - windows +# - darwin +# - linux +# - freebsd +# goarch: +# - amd64 +# - 386 +# - arm +# - arm64 +# goarm: +# - 6 +# - 7 +#archive: +# name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' +# replacements: +# darwin: Darwin +# linux: Linux +# windows: Windows +# 386: i386 +# amd64: x86_64 +# format_overrides: +# - goos: windows +# format: zip \ No newline at end of file diff --git a/README.md b/README.md index 066034c..31c1632 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## istio-micro -[![Build Status](https://travis-ci.org/xiaomeng79/istio-micro.svg?branch=master)](https://travis-ci.org/xiaomeng79/istio-micro) [![codecov](https://codecov.io/gh/xiaomeng79/istio-micro/branch/master/graph/badge.svg)](https://codecov.io/gh/xiaomeng79/istio-micro) +[![Build Status](https://travis-ci.org/xiaomeng79/istio-micro.svg?branch=master)](https://travis-ci.org/xiaomeng79/istio-micro) [![codecov](https://codecov.io/gh/xiaomeng79/istio-micro/branch/master/graph/badge.svg)](https://codecov.io/gh/xiaomeng79/istio-micro) [![Go Report Card](https://goreportcard.com/badge/github.com/xiaomeng79/istio-micro)](https://goreportcard.com/report/github.com/xiaomeng79/istio-micro) #### 使用go-micro构建微服务示例请到一下仓库 diff --git a/scripts/install.sh b/scripts/install.sh index 05bfa73..8e7b197 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,7 +1,7 @@ #!/bin/bash source scripts/.variables.sh -set -uxe +set -xe #定义变量 GOPROXY=${GOPROXY:-"https://goproxy.io"}