|
| 1 | +# Goreleaser configuration for mongo-scaffold |
| 2 | +# Builds and releases m and mlaunch binaries |
| 3 | + |
| 4 | +project_name: mongo-scaffold |
| 5 | + |
| 6 | +version: 2 |
| 7 | +# Build configuration |
| 8 | +builds: |
| 9 | + - id: m |
| 10 | + main: ./cmd/m |
| 11 | + binary: m |
| 12 | + goos: |
| 13 | + - linux |
| 14 | + - darwin |
| 15 | + goarch: |
| 16 | + - amd64 |
| 17 | + - arm64 |
| 18 | + env: |
| 19 | + - CGO_ENABLED=0 |
| 20 | + flags: |
| 21 | + - -trimpath |
| 22 | + ldflags: |
| 23 | + - -s -w |
| 24 | + - -X main.version={{.Version}} |
| 25 | + - -X main.commit={{.Commit}} |
| 26 | + - -X main.date={{.Date}} |
| 27 | + |
| 28 | + - id: mlaunch |
| 29 | + main: ./cmd/mlaunch |
| 30 | + binary: mlaunch |
| 31 | + goos: |
| 32 | + - linux |
| 33 | + - darwin |
| 34 | + goarch: |
| 35 | + - amd64 |
| 36 | + - arm64 |
| 37 | + env: |
| 38 | + - CGO_ENABLED=0 |
| 39 | + flags: |
| 40 | + - -trimpath |
| 41 | + ldflags: |
| 42 | + - -s -w |
| 43 | + - -X main.version={{.Version}} |
| 44 | + - -X main.commit={{.Commit}} |
| 45 | + - -X main.date={{.Date}} |
| 46 | + |
| 47 | + - id: mongo-cluster |
| 48 | + main: ./cmd/mongo-cluster |
| 49 | + binary: mongo-cluster |
| 50 | + goos: |
| 51 | + - linux |
| 52 | + - darwin |
| 53 | + goarch: |
| 54 | + - amd64 |
| 55 | + - arm64 |
| 56 | + env: |
| 57 | + - CGO_ENABLED=0 |
| 58 | + flags: |
| 59 | + - -trimpath |
| 60 | + ldflags: |
| 61 | + - -s -w |
| 62 | + - -X main.version={{.Version}} |
| 63 | + - -X main.commit={{.Commit}} |
| 64 | + - -X main.date={{.Date}} |
| 65 | + |
| 66 | +# Archive configuration |
| 67 | +archives: |
| 68 | + - id: default |
| 69 | + name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" |
| 70 | + files: |
| 71 | + - README.md |
| 72 | + - LICENSE* |
| 73 | + - CHANGELOG* |
| 74 | + builds: |
| 75 | + - m |
| 76 | + - mlaunch |
| 77 | + - mongo-cluster |
| 78 | + |
| 79 | +# Checksums |
| 80 | +checksum: |
| 81 | + name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" |
| 82 | + algorithm: sha256 |
| 83 | + |
| 84 | +# Snapshots |
| 85 | +# Note: snapshot.name_template is deprecated in GoReleaser 2.5.0 |
| 86 | +# Removed to avoid deprecation warnings |
| 87 | +snapshot: {} |
| 88 | + |
| 89 | +# Changelog |
| 90 | +changelog: |
| 91 | + sort: asc |
| 92 | + filters: |
| 93 | + exclude: |
| 94 | + - "^docs:" |
| 95 | + - "^test:" |
| 96 | + |
| 97 | +# Homebrew configuration |
| 98 | +# Note: GoReleaser 2.5.0 uses 'brews' field for Homebrew formulas |
| 99 | +brews: |
| 100 | + - name: mongo-scaffold |
| 101 | + homepage: "https://github.com/zph/mongo-scaffold" |
| 102 | + description: "MongoDB version manager and cluster launcher" |
| 103 | + license: "MIT" |
| 104 | + # Install all binaries manually since 'binaries' field is not supported in 2.5.0 |
| 105 | + install: | |
| 106 | + bin.install "m" |
| 107 | + bin.install "mlaunch" |
| 108 | + bin.install "mongo-cluster" |
| 109 | + test: | |
| 110 | + system "#{bin}/m", "--version" |
| 111 | + system "#{bin}/mlaunch", "--help" |
| 112 | + system "#{bin}/mongo-cluster", "--help" |
| 113 | +
|
| 114 | +# GitHub release configuration |
| 115 | +release: |
| 116 | + github: |
| 117 | + owner: zph |
| 118 | + name: mongo-scaffold |
| 119 | + # Draft releases |
| 120 | + draft: false |
| 121 | + # Prerelease for tags with -alpha, -beta, -rc |
| 122 | + mode: replace |
| 123 | + header: | |
| 124 | + ## {{ .Tag }} |
| 125 | +
|
| 126 | + {{ if .PreviousTag }} |
| 127 | + **Full Changelog**: https://github.com/zph/mongo-scaffold/compare/{{ .PreviousTag }}...{{ .Tag }} |
| 128 | + {{ end }} |
| 129 | +
|
| 130 | +# Docker (optional - can be removed if not needed) |
| 131 | +# dockers: |
| 132 | +# - goos: linux |
| 133 | +# goarch: amd64 |
| 134 | +# image_templates: |
| 135 | +# - "ghcr.io/zph/mongo-scaffold:{{ .Tag }}" |
| 136 | +# - "ghcr.io/zph/mongo-scaffold:latest" |
| 137 | +# dockerfile: Dockerfile |
| 138 | + |
| 139 | +# NFPM (for .deb and .rpm packages - optional) |
| 140 | +# nfpms: |
| 141 | +# - id: default |
| 142 | +# package_name: mongo-scaffold |
| 143 | +# file_name_template: "{{ .ConventionalFileName }}" |
| 144 | +# maintainer: "zph <zph@example.com>" |
| 145 | +# description: "MongoDB version manager and cluster launcher" |
| 146 | +# license: "MIT" |
| 147 | +# formats: |
| 148 | +# - deb |
| 149 | +# - rpm |
| 150 | +# dependencies: |
| 151 | +# - mongodb-community |
| 152 | +# contents: |
| 153 | +# - src: "{{ .ArtifactPath }}" |
| 154 | +# dst: "/usr/local/bin/{{ .Binary }}" |
| 155 | +# file_info: |
| 156 | +# mode: 0755 |
| 157 | + |
| 158 | +# Before hook (optional) |
| 159 | +# before: |
| 160 | +# hooks: |
| 161 | +# - go mod download |
| 162 | +# - go generate ./... |
| 163 | + |
| 164 | +# After hook (optional) |
| 165 | +# after: |
| 166 | +# hooks: |
| 167 | +# - echo "Release {{ .Tag }} completed!" |
| 168 | + |
0 commit comments