GitLabgitlab-org
cli
main
1project_name: glab
2version: 2
4release:
5 extra_files:
6 - glob: "./bin/*.exe"
8before:
9 hooks:
10 - go mod tidy
11 - go mod vendor
12 - make manpage
14builds:
15 - <<: &build_defaults
16 main: ./cmd/glab
17 binary: bin/glab
18 env:
19 - CGO_ENABLED=0
20 ldflags:
21 - -s -w -X main.version=v{{.Version}} -X main.commit={{.ShortCommit}} -X "main.goversion={{.Env.GO_VERSION}}"
22 id: macos
23 goos: [darwin]
24 goarch: [amd64, arm64]
25 hooks:
26 post:
27 - cmd: './scripts/sign-binary.sh macos "{{ .Path }}"'
28 output: true
30 - <<: *build_defaults
31 id: linux
32 goos: [linux]
33 goarch: ["386", arm, amd64, arm64, ppc64le, s390x]
35 - <<: *build_defaults
36 id: windows
37 goos: [windows]
38 goarch: ["386", amd64, arm64]
39 hooks:
40 post:
41 - cmd: './scripts/sign-binary.sh windows "{{ .Path }}"'
42 output: true
44 - <<: *build_defaults
45 id: freebsd
46 goos: [freebsd]
47 goarch: ["386", amd64, arm]
49gitlab_urls:
50 use_job_token: true
51 use_package_registry: true
53dockers:
54 - image_templates:
55 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
56 - "gitlab/glab:{{ .Tag }}-amd64"
57 dockerfile: Dockerfile
58 use: buildx
59 build_flag_templates:
60 - "--pull"
61 - "--label=org.opencontainers.image.created={{.Date}}"
62 - "--label=org.opencontainers.image.name={{.ProjectName}}"
63 - "--label=org.opencontainers.image.revision={{.FullCommit}}"
64 - "--label=org.opencontainers.image.version={{.Version}}"
65 - "--label=org.opencontainers.image.source={{.GitURL}}"
66 - "--platform=linux/amd64"
67 - image_templates:
68 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
69 - "gitlab/glab:{{ .Tag }}-arm64"
70 dockerfile: Dockerfile
71 use: buildx
72 build_flag_templates:
73 - "--pull"
74 - "--label=org.opencontainers.image.created={{.Date}}"
75 - "--label=org.opencontainers.image.name={{.ProjectName}}"
76 - "--label=org.opencontainers.image.revision={{.FullCommit}}"
77 - "--label=org.opencontainers.image.version={{.Version}}"
78 - "--label=org.opencontainers.image.source={{.GitURL}}"
79 - "--platform=linux/arm64"
80 goarch: arm64
81docker_manifests:
82 - name_template: "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}"
83 image_templates:
84 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
85 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
86 - name_template: "registry.gitlab.com/gitlab-org/cli:latest"
87 image_templates:
88 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-amd64"
89 - "registry.gitlab.com/gitlab-org/cli:{{ .Tag }}-arm64"
90 - name_template: "gitlab/glab:{{ .Tag }}"
91 image_templates:
92 - "gitlab/glab:{{ .Tag }}-amd64"
93 - "gitlab/glab:{{ .Tag }}-arm64"
94 - name_template: "gitlab/glab:latest"
95 image_templates:
96 - "gitlab/glab:{{ .Tag }}-amd64"
97 - "gitlab/glab:{{ .Tag }}-arm64"
99archives:
100 - id: nix
101 ids: [macos, linux, freebsd]
102 wrap_in_directory: false
104 - id: windows
105 ids: [windows]
106 formats: zip
108source:
109 enabled: true
110 name_template: "{{ .ProjectName }}_{{ .Version }}_source"
111 format: tar.gz
112 files:
113 - vendor/*
115nfpms:
116 - id: foo
117 package_name: glab
119 # Build IDs for the builds you want to create NFPM packages for.
120 # Defaults to all builds.
122 vendor: GitLab
123 homepage: https://gitlab.com/gitlab-org/cli
124 # using service-desk email https://docs.gitlab.com/user/project/service_desk/
125 maintainer: GitLab<contact-project+gitlab-org-cli-34675721-issue-@incoming.gitlab.com>
126 description: An open source GitLab CLI tool
127 license: MIT
128 formats:
129 - apk
130 - deb
131 - rpm
132 dependencies:
133 - git
134 bindir: /usr
135 contents:
136 - src: "./share/man/man1/glab*.1"
137 dst: "/usr/share/man/man1"
139checksum:
140 name_template: "checksums.txt"
141 extra_files:
142 - glob: ./bin/*installer.exe
144snapshot:
145 version_template: "{{ .Tag }}"
146changelog:
147 # https://goreleaser.com/customization/changelog/
148 use: gitlab
149 sort: asc
150 abbrev: 8
151 # Author markers are hidden on GitLab; the Slack template swaps them for emoji.
152 format: '{{ $p := split .Message ": " }}{{ if and (gt (len $p) 1) (not (contains (index $p 0) " ")) }}**{{ index $p 0 }}:** {{ trimprefix .Message (printf "%s: " (index $p 0)) }}{{ else }}{{ .Message }}{{ end }} ([{{ .SHA }}](https://gitlab.com/gitlab-org/cli/-/commit/{{ .SHA }})) by {{ .AuthorName }}{{ if eq .AuthorEmail "gitlab-bot@gitlab.com" }}<!--bot-->{{ else if ne (trimsuffix .AuthorEmail "@gitlab.com") .AuthorEmail }}<!--team-->{{ else }}<!--community-->{{ end }}'
153 filters:
154 exclude:
155 - "^Merge branch"
156 - "^Update README.md"
157 groups:
158 - title: ✨ Features
159 regexp: '^.*?feat(\([^)]+\))??!?:.+$'
160 order: 0
161 - title: 🐛 Bug Fixes
162 regexp: '^.*?fix(\([^)]+\))??!?:.+$'
163 order: 1
164 - title: 📝 Documentation
165 regexp: '^.*?docs(\([^)]+\))??!?:.+$'
166 order: 2
167 - title: 📦 Dependencies
168 regexp: '^.*?chore\((deps|dependencies)\)[^:]*:.+$'
169 order: 4
170 - title: 🔧 Maintenance
171 regexp: '^.*?(chore|ci|refactor)(\([^)]+\))??!?:.+$'
172 order: 3
173 - title: 🔀 Others
174 order: 999
176announce:
177 slack:
178 enabled: true
179 # Set SLACK_WEBHOOK environment variable in your CI/CD settings
180 # Format: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX
181 channel: '{{ .Env.SLACK_CHANNEL }}'
182 username: 'glab Release Bot'
183 icon_emoji: ':glab:'
184 # Plain-text fallback for notifications; the markdown block below is what renders.
185 message_template: "glab {{ .Tag }} has been released: {{ .ReleaseURL }}"
186 blocks:
187 - type: markdown
188 text: |
189 {{- $notes := reverseFilter .ReleaseNotes `^## Changelog` }}
190 {{- $notes = replace $notes "<!--bot-->" " 🤖" }}
191 {{- $notes = replace $notes "<!--team-->" " :tanuki:" }}
192 {{- $notes = replace $notes "<!--community-->" " :community:" }}
193 {{- /* Collapse two or more Go module bumps into a count; other dependency lines stay. */}}
194 {{- $modRe := `chore\((deps|dependencies)\)[^:]*:\*\* update module ` }}
195 {{- $modCount := len (split (filter $notes $modRe) "\n") }}
196 {{- $depsHeading := "### 📦 Dependencies" }}
197 {{- /* GitLab changelogs end lines with " \n", so match the heading without its newline. */}}
198 {{- if and (gt $modCount 1) (contains $notes $depsHeading) }}
199 {{- $notes = reverseFilter $notes $modRe }}
200 {{- $notes = replace $notes $depsHeading (printf "%s\n* %d Go module updates" $depsHeading $modCount) }}
201 {{- end -}}
202 🚀 **glab {{ .Tag }}** has been released!
204 {{/* Cap below Slack's 12,000-character block limit. */ -}}
205 {{ if gt (len $notes) 10000 }}{{ slice $notes 0 10000 }}…{{ else }}{{ $notes }}{{ end }}
207 [View release on GitLab]({{ .ReleaseURL }})
Diagnostics5 git calls · 226 ms
CallStatusSizeTime0226 ms
discover200185 B2 ms
git.upload-pack discover http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=2 git.response.bytes=185 git.server.agent=git/2.56.g1891de4-Linux git.server.object_format=sha1 git.server.caps=agent ls-refs fetch server-option object-format git.server.fetch=shallow wait-for-done filter git.protocol.version=2 git.pkt.frames=9 git.pkt.data=7 git.pkt.flush=2 git.pkt.delim=0 git.pkt.bytes=185 git.pkt.payload.max=35
ls-refs20058 KiB · hit3 ms
git.upload-pack ls-refs http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=ls-refs git.upstream.dur_ms=3 git.response.bytes=59849 git.response.cache=HIT git.response.duration_ms=3 git.protocol.version=2 git.pkt.frames=731 git.pkt.data=730 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=59849 git.pkt.payload.max=143 git.ls_refs.count=730 git.ls_refs.head=refs/heads/main
fetchtree:0 · deepen 1020032 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=32926 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=tree:0 git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9 git.fetch.haves.count=0 git.fetch.deepen=10 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=22 git.pkt.data=20 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=32926 git.pkt.payload.max=32046 git.sideband.band1.bytes=32046 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=80 git.pack.bytes=32046 git.pack.ofs_delta=36 git.pack.ref_delta=0 git.pack.chain.max=2 git.pack.trailer=cb0bad5d7ffc514895d8b21c4dd470327f90bc91 git.pack.full=44Open pack map
fetchcombine:blob:none+tree:2 · deepen 12004.2 KiB · hit3 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=3 git.response.bytes=4273 git.response.cache=HIT git.response.duration_ms=3 git.fetch.filter=combine:blob:none+tree:2 git.fetch.wants=0dd7574dce9e385c5c30540e6c15657adc6bdce9 git.fetch.haves.count=0 git.fetch.deepen=1 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=7 git.pkt.data=5 git.pkt.flush=1 git.pkt.delim=1 git.pkt.bytes=4273 git.pkt.payload.max=4173 git.sideband.band1.bytes=4173 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0 git.pack.objects=11 git.pack.bytes=4173 git.fetch.wide.objects=11 git.fetch.wide.extra_bytes=3930 git.fetch.wide.blobs=0
fetch2002.4 KiB220 ms
git.upload-pack fetch http.response.status_code=200 git.upstream.cf_ray=- git.upstream.phase=fetch git.upstream.dur_ms=220 git.response.bytes=2431 git.response.cache=MISS git.response.duration_ms=220 git.fetch.wants=da19abf2ed6609e34a543239c265fe7a13f24ae9 git.fetch.haves.count=0 git.fetch.deepen=0 git.fetch.thin_pack=false git.fetch.ofs_delta=true git.protocol.version=2 git.pkt.frames=4 git.pkt.data=3 git.pkt.flush=1 git.pkt.delim=0 git.pkt.bytes=2431 git.pkt.payload.max=2404 git.sideband.band1.bytes=2404 git.sideband.band2.bytes=0 git.sideband.band3.bytes=0
Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.
- Remote
- https://gitlab.com/gitlab-org/cli
- Ref
- refs/heads/main
- Commit
- 0dd7574dce9e385c5c30540e6c15657adc6bdce9
- cf-ray
- a5e217b12a9fecd4
- Request
- b82a66fa…
- Protocol
- v2 · sha1
- Agent
- git/2.56.g1891de4-Linux
- Filter
- advertised
- Fetch
- shallow wait-for-done filter
- Capabilities
- agent ls-refs fetch server-option object-format