Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ completion

# Dependency directories (remove the comment below to include it)
# vendor/
/.goreleaser.vendor.yaml
97 changes: 97 additions & 0 deletions .goreleaser.vendor.yaml.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# GoReleaser configuration for the ${VENDOR_NAME} CLI.
project_name: ${VENDOR_BINARY}

before:
hooks:
- go generate ./...
- bash scripts/generate_completions.sh

builds:
- binary: ${VENDOR_BINARY}
id: ${VENDOR_BINARY}
env:
- CGO_ENABLED=0
tags:
- vendor
goos:
- linux
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
- -X "github.com/platformsh/cli/internal/legacy.PHPVersion={{.Env.PHP_VERSION}}"
- -X "github.com/platformsh/cli/internal/legacy.LegacyCLIVersion={{.Env.LEGACY_CLI_VERSION}}"
- -X "github.com/platformsh/cli/commands.version={{.Version}}"
- -X "github.com/platformsh/cli/commands.commit={{.Commit}}"
- -X "github.com/platformsh/cli/commands.date={{.Date}}"
- -X "github.com/platformsh/cli/commands.vendor=${VENDOR_BINARY}"
- -X "github.com/platformsh/cli/commands.builtBy=goreleaser"
main: ./cmd/platform
- binary: ${VENDOR_BINARY}
id: ${VENDOR_BINARY}-macos
env:
- CGO_ENABLED=0
tags:
- vendor
goos:
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X "github.com/platformsh/cli/internal/legacy.PHPVersion={{.Env.PHP_VERSION}}"
- -X "github.com/platformsh/cli/internal/legacy.LegacyCLIVersion={{.Env.LEGACY_CLI_VERSION}}"
- -X "github.com/platformsh/cli/commands.version={{.Version}}"
- -X "github.com/platformsh/cli/commands.commit={{.Commit}}"
- -X "github.com/platformsh/cli/commands.date={{.Date}}"
- -X "github.com/platformsh/cli/commands.vendor=${VENDOR_BINARY}"
- -X "github.com/platformsh/cli/commands.builtBy=goreleaser"
main: ./cmd/platform

checksum:
name_template: checksums.txt

snapshot:
name_template: '{{ incpatch .Version }}-{{ .Now.Format "2006-01-02" }}-{{ .ShortCommit }}-next'

universal_binaries:
- id: ${VENDOR_BINARY}-macos
name_template: ${VENDOR_BINARY}
replace: true

archives:
- name_template: "${VENDOR_BINARY}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- README.md
- completion/*
format_overrides:
- goos: windows
format: zip

nfpms:
- homepage: https://docs.platform.sh/administration/cli.html
package_name: ${VENDOR_BINARY}-cli
description: ${VENDOR_NAME} CLI
maintainer: Antonis Kalipetis <antonis.kalipetis@platform.sh>
license: MIT
vendor: Platform.sh
builds:
- ${VENDOR_BINARY}
formats:
- apk
- deb
- rpm
contents:
- src: completion/bash/${VENDOR_BINARY}.bash
dst: /etc/bash_completion.d/${VENDOR_BINARY}
- src: completion/zsh/_${VENDOR_BINARY}
dst: /usr/local/share/zsh/site-functions/_${VENDOR_BINARY}

release:
disable: true
Loading