mirror of https://gitlab.com/gitlab-org/cli.git
127 lines
3.0 KiB
YAML
127 lines
3.0 KiB
YAML
project_name: glab
|
|
|
|
release:
|
|
prerelease: auto
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- make manpage
|
|
|
|
builds:
|
|
- <<: &build_defaults
|
|
main: ./cmd/glab
|
|
binary: bin/glab
|
|
env:
|
|
- CGO_ENABLED=0
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}} -X main.build={{time "2006-01-02"}}
|
|
id: macos
|
|
goos: [darwin]
|
|
goarch: [amd64]
|
|
|
|
- <<: *build_defaults
|
|
id: linux
|
|
goos: [linux]
|
|
goarch: [386, amd64]
|
|
|
|
- <<: *build_defaults
|
|
id: windows
|
|
goos: [windows]
|
|
goarch: [386, amd64]
|
|
|
|
dockers:
|
|
- image_templates:
|
|
- 'profclems/glab:{{ .Tag }}'
|
|
- 'ghcr.io/profclems/glab:{{ .Tag }}'
|
|
dockerfile: Dockerfile
|
|
use_buildx: true
|
|
build_flag_templates:
|
|
- "--pull"
|
|
- "--label=org.opencontainers.image.created={{.Date}}"
|
|
- "--label=org.opencontainers.image.name={{.ProjectName}}"
|
|
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
|
- "--label=org.opencontainers.image.version={{.Version}}"
|
|
- "--label=org.opencontainers.image.source={{.GitURL}}"
|
|
- "--platform=linux/amd64"
|
|
extra_files:
|
|
- scripts/entrypoint.sh
|
|
docker_manifests:
|
|
- name_template: 'profclems/glab:{{ .Tag }}'
|
|
image_templates:
|
|
- 'profclems/glab:{{ .Tag }}'
|
|
- name_template: 'profclems/glab:latest'
|
|
image_templates:
|
|
- 'profclems/glab:{{ .Tag }}'
|
|
- name_template: 'ghcr.io/profclems/glab:latest'
|
|
image_templates:
|
|
- 'ghcr.io/profclems/glab:{{ .Tag }}'
|
|
|
|
archives:
|
|
- id: nix
|
|
builds: [macos, linux]
|
|
<<: &archive_defaults
|
|
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
|
|
wrap_in_directory: false
|
|
format: tar.gz
|
|
replacements:
|
|
darwin: macOS
|
|
linux: Linux
|
|
<<: &arch_replacemens
|
|
386: i386
|
|
amd64: x86_64
|
|
|
|
- id: windows
|
|
builds: [windows]
|
|
<<: *archive_defaults
|
|
format: zip
|
|
replacements:
|
|
windows: Windows
|
|
<<: *arch_replacemens
|
|
|
|
nfpms:
|
|
-
|
|
id: foo
|
|
package_name: glab
|
|
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
|
|
|
# Build IDs for the builds you want to create NFPM packages for.
|
|
# Defaults to all builds.
|
|
|
|
replacements:
|
|
amd64: x86_64
|
|
386: i386
|
|
darwin: macOS
|
|
linux: Linux
|
|
vendor: Clement Sam
|
|
homepage: https://github.com/profclems/glab
|
|
maintainer: Clement Sam <clementsam75@gmail.com>
|
|
description: An open source gitlab cli tool
|
|
license: MIT
|
|
formats:
|
|
- apk
|
|
- deb
|
|
- rpm
|
|
dependencies:
|
|
- git
|
|
# Override default /usr/local/bin destination for binaries
|
|
# Since glab is already archived in the bin directory it would install in /usr/bin/glab
|
|
bindir: /usr
|
|
contents:
|
|
- src: "./share/man/man1/glab*.1"
|
|
dst: "/usr/share/man/man1"
|
|
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
snapshot:
|
|
name_template: "{{ .Tag }}"
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
- '^Merge pull request'
|
|
- '^chore'
|
|
- '^Update README.md'
|