From bb317f5ad970b38ccc60ce237233f8a8d2472d04 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Tue, 18 Jul 2023 22:16:49 +0800 Subject: [PATCH] feat: release branch Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .goreleaser.yaml | 21 +++++++++++++++++++++ cmd/syncer/main.go | 6 +++--- deploy/exporter/Dockerfile.exporter | 4 ++-- deploy/syncer/Dockerfile.syncer | 4 ++-- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ce5b294..129cccf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -204,6 +204,27 @@ changelog: # - linux/amd64 # - linux/arm64 +# .goreleaser.yaml +milestones: + # You can have multiple milestone configs + - + # Repository for the milestone + # Default is extracted from the origin remote URL + repo: + owner: user + name: repo + + # Whether to close the milestone + close: true + + # Fail release on errors, such as missing milestone. + fail_on_error: false + + # Name of the milestone + # + # Default: '{{ .Tag }}' + name_template: "Current Release" + checksum: name_template: "{{ .ProjectName }}_checksums.txt" algorithm: sha256 diff --git a/cmd/syncer/main.go b/cmd/syncer/main.go index a37dd77..28d3ffb 100644 --- a/cmd/syncer/main.go +++ b/cmd/syncer/main.go @@ -14,7 +14,7 @@ import ( "github.com/joho/godotenv" "github.com/kubecub/github-label-syncer/pkg/github" - "go.uber.org/multierr" + // "go.uber.org/multierr" ) func main() { @@ -69,12 +69,12 @@ func run(ctx context.Context) error { s := strings.Split(r, "/") if len(s) != 2 { - err = multierr.Append(err, fmt.Errorf("invalid repository: %s", repository)) + // err = multierr.Append(err, fmt.Errorf("invalid repository: %s", repository)) } owner, repo := s[0], s[1] if err := client.SyncLabels(ctx, owner, repo, labels, prune); err != nil { - err = multierr.Append(err, fmt.Errorf("unable to sync labels: %w", err)) + // err = multierr.Append(err, fmt.Errorf("unable to sync labels: %w", err)) } } diff --git a/deploy/exporter/Dockerfile.exporter b/deploy/exporter/Dockerfile.exporter index 7b4896f..231d48f 100644 --- a/deploy/exporter/Dockerfile.exporter +++ b/deploy/exporter/Dockerfile.exporter @@ -8,7 +8,7 @@ ENV GOPROXY=https://goproxy.cn COPY . /app/ -RUN make build +RUN go build -o /app/_output/bin/exporter /app/cmd/exporter/main.go # 设置容器启动命令 -CMD ["/app/_output/bin/platforms/linux/amd64/exporter --help"] \ No newline at end of file +CMD ["/app/_output/bin/exporter --help"] \ No newline at end of file diff --git a/deploy/syncer/Dockerfile.syncer b/deploy/syncer/Dockerfile.syncer index f173fac..7e37b33 100644 --- a/deploy/syncer/Dockerfile.syncer +++ b/deploy/syncer/Dockerfile.syncer @@ -8,7 +8,7 @@ ENV GOPROXY=https://goproxy.cn COPY . /app/ -RUN make build +RUN go build -o /app/_output/bin/syncer /app/cmd/syncer/main.go # 设置容器启动命令 -CMD ["/app/_output/bin/platforms/linux/amd64/syncer --help"] +CMD ["/app/_output/bin/syncer --help"]