github.com/olli-ai/jx/v2@v2.0.400-0.20210921045218-14731b4dd448/.goreleaser.yml (about) 1 env: 2 - GO111MODULE=on 3 - CGO_ENABLED=0 4 before: 5 hooks: 6 - go mod download 7 8 builds: 9 - id: jx-linux-amd64 10 # Path to main.go file or main package. 11 # Default is `.`. 12 main: ./cmd/jx/jx.go 13 14 # Binary name. 15 # Can be a path (e.g. `bin/app`) to wrap the binary in a directory. 16 # Default is the name of the project directory. 17 binary: jx 18 19 # Custom ldflags templates. 20 # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`. 21 ldflags: 22 - -X "{{.Env.ROOTPACKAGE}}/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.GoVersion={{.Env.GOVERSION}}" 23 24 # GOOS list to build for. 25 # For more info refer to: https://golang.org/doc/install/source#environment 26 # Defaults are darwin and linux. 27 goos: 28 - linux 29 30 # GOARCH to build for. 31 # For more info refer to: https://golang.org/doc/install/source#environment 32 # Defaults are 386 and amd64. 33 goarch: 34 - amd64 35 36 - id: jx-linux-arm 37 # Path to main.go file or main package. 38 # Default is `.`. 39 main: ./cmd/jx/jx.go 40 41 # Binary name. 42 # Can be a path (e.g. `bin/app`) to wrap the binary in a directory. 43 # Default is the name of the project directory. 44 binary: jx 45 46 # Custom ldflags templates. 47 # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`. 48 ldflags: 49 - -X "{{.Env.ROOTPACKAGE}}/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.GoVersion={{.Env.GOVERSION}}" 50 51 # GOOS list to build for. 52 # For more info refer to: https://golang.org/doc/install/source#environment 53 # Defaults are darwin and linux. 54 goos: 55 - linux 56 57 # GOARCH to build for. 58 # For more info refer to: https://golang.org/doc/install/source#environment 59 # Defaults are 386 and amd64. 60 goarch: 61 - arm 62 63 - id: jx-darwin-amd64 64 # Path to main.go file or main package. 65 # Default is `.`. 66 main: ./cmd/jx/jx.go 67 68 # Binary name. 69 # Can be a path (e.g. `bin/app`) to wrap the binary in a directory. 70 # Default is the name of the project directory. 71 binary: jx 72 73 # Custom ldflags templates. 74 # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`. 75 ldflags: 76 - -X "{{.Env.ROOTPACKAGE}}/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.GoVersion={{.Env.GOVERSION}}" 77 78 # GOOS list to build for. 79 # For more info refer to: https://golang.org/doc/install/source#environment 80 # Defaults are darwin and linux. 81 goos: 82 - darwin 83 84 # GOARCH to build for. 85 # For more info refer to: https://golang.org/doc/install/source#environment 86 # Defaults are 386 and amd64. 87 goarch: 88 - amd64 89 90 - id: jx-windows-amd64 91 # Path to main.go file or main package. 92 # Default is `.`. 93 main: ./cmd/jx/jx.go 94 95 # Binary name. 96 # Can be a path (e.g. `bin/app`) to wrap the binary in a directory. 97 # Default is the name of the project directory. 98 binary: jx 99 100 # Custom ldflags templates. 101 # Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`. 102 ldflags: 103 - -X "{{.Env.ROOTPACKAGE}}/pkg/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/version.GoVersion={{.Env.GOVERSION}}" 104 105 # GOOS list to build for. 106 # For more info refer to: https://golang.org/doc/install/source#environment 107 # Defaults are darwin and linux. 108 goos: 109 - windows 110 111 # GOARCH to build for. 112 # For more info refer to: https://golang.org/doc/install/source#environment 113 # Defaults are 386 and amd64. 114 goarch: 115 - amd64 116 117 archives: 118 - name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" 119 format_overrides: 120 - goos: windows 121 format: zip 122 123 checksum: 124 # You can change the name of the checksums file. 125 # Default is `{{ .ProjectName }}_{{ .Version }}_checksums.txt`. 126 name_template: "{{ .ProjectName }}-checksums.txt" 127 128 # Algorithm to be used. 129 # Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384. 130 # Default is sha256. 131 algorithm: sha256 132 133 brews: 134 - name: jx 135 136 # Repository to push the tap to. 137 github: 138 owner: jenkins-x 139 name: homebrew-jx 140 141 # Template for the url. 142 # Default is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}" 143 url_template: "http://github.com/jenkins-x/jx/releases/download/{{ .Tag }}/{{ .ArtifactName }}" 144 145 # Git author used to commit to the repository. 146 # Defaults are shown. 147 commit_author: 148 name: jenkins-x-bot 149 email: jenkins-x-bot@jenkins-x.io 150 folder: Formula 151 homepage: "https://jenkins-x.io/" 152 description: "A tool to install and interact with Jenkins X on your Kubernetes cluster." 153 154 # Setting this will prevent goreleaser to actually try to commit the updated 155 # formula - instead, the formula file will be stored on the dist folder only, 156 # leaving the responsibility of publishing it to the user. 157 # If set to auto, the release will not be uploaded to the homebrew tap 158 # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 159 # Default is false. 160 skip_upload: true 161 162 # So you can `brew test` your formula. 163 # Default is empty. 164 test: | 165 system "#{bin}/jx --version" 166 167 # Custom install script for brew. 168 # Default is 'bin.install "program"'. 169 install: | 170 bin.install name 171 172 output = Utils.popen_read("SHELL=bash #{bin}/jx completion bash") 173 (bash_completion/"jx").write output 174 175 output = Utils.popen_read("SHELL=zsh #{bin}/jx completion zsh") 176 (zsh_completion/"_jx").write output 177 178 prefix.install_metafiles 179 180 changelog: 181 # set it to true if you wish to skip the changelog generation 182 skip: true 183 184 release: 185 # If set to true, will not auto-publish the release. 186 # Default is false. 187 draft: false 188 189 # If set to auto, will mark the release as not ready for production 190 # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 191 # If set to true, will mark the release as not ready for production. 192 # Default is false. 193 prerelease: true 194 195 # You can change the name of the GitHub release. 196 # Default is `{{.Tag}}` 197 name_template: "{{.Env.VERSION}}"