|
| 1 | +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json |
| 2 | +# vim: set ts=2 sw=2 tw=0 fo=cnqoj |
| 3 | +version: 2 |
| 4 | + |
| 5 | +project_name: tiger-cli |
| 6 | + |
| 7 | +# Create VERSION file before building |
| 8 | +before: |
| 9 | + hooks: |
| 10 | + - sh -c 'echo "{{ .Tag }}" > latest.txt' |
| 11 | + |
| 12 | +builds: |
| 13 | + - main: ./cmd/tiger |
| 14 | + binary: tiger |
| 15 | + env: |
| 16 | + - CGO_ENABLED=0 |
| 17 | + goos: |
| 18 | + - linux |
| 19 | + - windows |
| 20 | + - darwin |
| 21 | + goarch: |
| 22 | + - 386 |
| 23 | + - amd64 |
| 24 | + - arm64 |
| 25 | + ldflags: |
| 26 | + - -s -w |
| 27 | + - -X github.com/timescale/tiger-cli/internal/tiger/cmd.Version={{.Version}} |
| 28 | + - -X github.com/timescale/tiger-cli/internal/tiger/cmd.BuildTime={{.Date}} |
| 29 | + - -X github.com/timescale/tiger-cli/internal/tiger/cmd.GitCommit={{.Commit}} |
| 30 | + |
| 31 | +archives: |
| 32 | + - id: archive |
| 33 | + formats: [tar.gz] |
| 34 | + |
| 35 | + # use zip for windows archives |
| 36 | + format_overrides: |
| 37 | + - goos: windows |
| 38 | + formats: [zip] |
| 39 | + |
| 40 | + # this name template makes the OS and Arch compatible with the results of `uname`. |
| 41 | + name_template: >- |
| 42 | + {{ .ProjectName }}_ |
| 43 | + {{- title .Os }}_ |
| 44 | + {{- if eq .Arch "amd64" }}x86_64 |
| 45 | + {{- else if eq .Arch "386" }}i386 |
| 46 | + {{- else }}{{ .Arch }}{{ end }} |
| 47 | + {{- if .Arm }}v{{ .Arm }}{{ end }} |
| 48 | +
|
| 49 | + files: |
| 50 | + - README.md |
| 51 | + - LICENSE |
| 52 | + - NOTICE |
| 53 | + |
| 54 | +# Linux package configuration (APT, RPM, etc.) |
| 55 | +nfpms: |
| 56 | + - id: packages |
| 57 | + package_name: tiger-cli |
| 58 | + vendor: Timescale, Inc., d/b/a TigerData |
| 59 | + homepage: https://github.com/timescale/tiger-cli |
| 60 | + maintainer: TigerData <support@tigerdata.com> |
| 61 | + description: |- |
| 62 | + Tiger CLI - TigerData Cloud Platform CLI |
| 63 | + Command-line interface for managing TigerData Cloud Platform resources |
| 64 | + license: Apache-2.0 |
| 65 | + formats: |
| 66 | + - deb |
| 67 | + - rpm |
| 68 | + - apk |
| 69 | + bindir: /usr/bin |
| 70 | + priority: extra |
| 71 | + file_name_template: "{{ .ConventionalFileName }}" |
| 72 | + rpm: |
| 73 | + group: Unspecified |
| 74 | + deb: |
| 75 | + lintian_overrides: |
| 76 | + - statically-linked-binary |
| 77 | + |
| 78 | + |
| 79 | +# S3 Blob Storage Configuration |
| 80 | +blobs: |
| 81 | + # Versioned release artifacts |
| 82 | + - provider: s3 |
| 83 | + bucket: tiger-cli-releases |
| 84 | + region: us-east-1 |
| 85 | + directory: "releases/{{ .Tag }}" |
| 86 | + ids: |
| 87 | + - archive # Archive ID |
| 88 | + - packages # nfpms package ID |
| 89 | + |
| 90 | + # Upload install script and latest version file to bucket root (skip for prereleases) |
| 91 | + - provider: s3 |
| 92 | + bucket: tiger-cli-releases |
| 93 | + region: us-east-1 |
| 94 | + directory: "install" |
| 95 | + extra_files_only: true |
| 96 | + disable: '{{ ne .Prerelease "" }}' # Skip this step for pre-releases |
| 97 | + extra_files: |
| 98 | + - glob: ./latest.txt |
| 99 | + name_template: "latest.txt" |
| 100 | + - glob: ./scripts/install.sh |
| 101 | + name_template: "install.sh" |
| 102 | + |
| 103 | +# Homebrew cask configuration |
| 104 | +homebrew_casks: |
| 105 | + - name: tiger-cli |
| 106 | + |
| 107 | + repository: |
| 108 | + owner: timescale |
| 109 | + name: homebrew-tap |
| 110 | + token: "{{ .Env.TAP_GITHUB_TOKEN }}" |
| 111 | + homepage: https://github.com/timescale/tiger-cli |
| 112 | + description: |- |
| 113 | + Tiger CLI - TigerData Cloud Platform CLI |
| 114 | + Command-line interface for managing TigerData Cloud Platform resources |
| 115 | + binary: tiger |
| 116 | + license: Apache-2.0 |
| 117 | + skip_upload: auto |
| 118 | + url: |
| 119 | + template: "https://tiger-cli-releases.s3.us-east-1.amazonaws.com/releases/{{ .Tag }}/{{ .ArtifactName }}" |
| 120 | + hooks: |
| 121 | + # TODO: Sign and notarize instead of removing quarantine bit |
| 122 | + # See: https://goreleaser.com/customization/homebrew_casks/#signing-and-notarizing |
| 123 | + post: |
| 124 | + install: | |
| 125 | + if OS.mac? |
| 126 | + system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/tiger"] |
| 127 | + end |
| 128 | + # Optional: Add caveats for user instructions |
| 129 | + caveats: | |
| 130 | + Tiger CLI has been installed successfully! |
| 131 | +
|
| 132 | + Get started with: |
| 133 | + tiger auth login |
| 134 | +
|
| 135 | + For help: |
| 136 | + tiger --help |
| 137 | +
|
| 138 | +# Checksum configuration - split into individual files for easier validation |
| 139 | +checksum: |
| 140 | + split: true |
| 141 | + |
| 142 | +changelog: |
| 143 | + sort: asc |
| 144 | + filters: |
| 145 | + exclude: |
| 146 | + - "^specs:" |
| 147 | + # TODO: Other files that should be ignored |
| 148 | + |
| 149 | +# Release configuration |
| 150 | +release: |
| 151 | + github: |
| 152 | + owner: timescale |
| 153 | + name: tiger-cli |
| 154 | + draft: false |
| 155 | + prerelease: auto |
| 156 | + name_template: "Release {{ .Tag }}" |
0 commit comments