mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
- **switch tea to the Cobra command tree:** `internal/app` wires the packages from parts 1–4 into explicit noun/verb commands with `--repo`, `--json` / `--jq`, `--sudo` and `--debug`; `main.go` points at it. Build, release and docs tooling (`tools/cli-docs`, Makefile, goreleaser, snap, CI) and README / CONTRIBUTING are updated. - **remove the urfave/cli command tree:** deletes `cmd/`, `modules/`, the old integration tests, contrib completion scripts and the generated `docs/CLI.md`, and drops their dependencies. This commit only deletes. ## Breaking changes This is a breaking release. It requires Gitea 28 or newer; configuration moves to separate `config.yml` and `hosts.yml` files and requires fresh authentication, and command names, aliases, flags and output formats change. `docs/migration-1.0.md` maps every old command, flag and environment variable to its replacement. ## Issues fixes #1118 fixes #1116 fixes #1115 fixes #1094 fixes #1091 fixes #1073 fixes #1052 fixes #1032 fixes #1023 fixes #966 fixes #908 fixes #833 fixes #831 fixes #817 fixes #804 fixes #779 fixes #770 fixes #737 fixes #697 fixes #726 fixes #677 fixes #672 fixes #633 fixes #632 fixes #560 fixes #556 fixes #523 fixes #516 fixes #510 fixes #504 fixes #500 fixes #482 fixes #406 fixes #403 fixes #373 fixes #351 fixes #344 fixes #326 fixes #325 fixes #323 fixes #246 fixes #240 fixes #232 fixes #197 fixes #172 fixes #141 fixes #69 fixes #1110 fixes #569 fixes #480 fixes #666 fixes #670 fixes #457 fixes #643 fixes #498 fixes #490 fixes #1069 fixes #834 fixes #602 fixes #328 fixes #417 fixes #571 fixes #1029 fixes #489 fixes #1050 fixes #162 fixes #430 fixes #1087 fixes #683 Reviewed-on: https://gitea.com/gitea/tea/pulls/1126 Reviewed-by: TheFox0x7 <95654+thefox0x7@noreply.gitea.com>
161 lines
4.6 KiB
YAML
161 lines
4.6 KiB
YAML
version: 2
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
# Regenerate references/man/completions, then pack a versioned docs
|
|
# archive outside dist/ (goreleaser requires dist/ empty after hooks).
|
|
# tea-{{ .Version }}-docs.tar.xz is picked up by release/publisher/
|
|
# checksum ./**.xz globs alongside binary .xz artifacts.
|
|
- make docs-archive DOCS_ARCHIVE=tea-{{ .Version }}-docs.tar.xz
|
|
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- darwin
|
|
- linux
|
|
- windows
|
|
- freebsd
|
|
goarch:
|
|
- amd64
|
|
- arm
|
|
- arm64
|
|
goarm:
|
|
- "5"
|
|
- "6"
|
|
- "7"
|
|
ignore:
|
|
- goos: darwin
|
|
goarch: arm
|
|
- goos: darwin
|
|
goarch: ppc64le
|
|
- goos: darwin
|
|
goarch: s390x
|
|
- goos: windows
|
|
goarch: ppc64le
|
|
- goos: windows
|
|
goarch: s390x
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "5"
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "6"
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "7"
|
|
- goos: freebsd
|
|
goarch: ppc64le
|
|
- goos: freebsd
|
|
goarch: s390x
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "5"
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "6"
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "7"
|
|
- goos: freebsd
|
|
goarch: arm64
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -X "gitea.dev/tea/internal/version.Version={{ trimprefix .Summary "v" }}" -X "gitea.dev/tea/internal/version.Tags="
|
|
binary: >-
|
|
{{ .ProjectName }}-
|
|
{{- .Version }}-
|
|
{{- .Os }}-
|
|
{{- if eq .Arch "amd64" }}amd64
|
|
{{- else if eq .Arch "amd64_v1" }}amd64
|
|
{{- else if eq .Arch "386" }}386
|
|
{{- else }}{{ .Arch }}{{ end }}
|
|
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
|
no_unique_dist_dir: true
|
|
hooks:
|
|
post:
|
|
- cmd: xz -k -9 {{ .Path }}
|
|
dir: ./dist/
|
|
- cmd: sh .goreleaser.checksum.sh {{ .Path }}
|
|
- cmd: sh .goreleaser.checksum.sh {{ .Path }}.xz
|
|
|
|
# Uploads the release artifacts to Cloudflare R2. A `blobs:` entry is
|
|
# not used here since the blob pipe authenticates from the global
|
|
# AWS_* env with no per-entry credentials; `publishers:` supports
|
|
# per-entry `env:` instead, so it's used to invoke
|
|
# scripts/upload-r2.sh once per artifact. Custom publishers inherit
|
|
# almost nothing from the environment, hence the explicit R2_*
|
|
# forwarding below.
|
|
#
|
|
# This publisher fires more than once per distinct key because
|
|
# goreleaser's release pipe already registers `release.extra_files`
|
|
# (./**.xz and ./**.xz.sha256, see the `release:` block below) as
|
|
# UploadableFile artifacts, and `internal/exec`'s filterArtifacts
|
|
# appends this block's own extra_files with no de-duplication. It
|
|
# can't be globbed away, since gobwas/glob (via goreleaser/fileglob)
|
|
# has no substring-exclusion matcher. It's harmless: PUT is
|
|
# idempotent, and the `./**.xz` glob below is kept deliberately so
|
|
# this publisher declares its own complete file set rather than
|
|
# implicitly depending on the `release:` block's globs.
|
|
#
|
|
# checksum: true mirrors goreleaser's generated checksums.txt;
|
|
# signature: true additionally mirrors checksums.txt.sig, which the
|
|
# `signs:` block below produces by GPG-signing that checksum file.
|
|
# Without signature: true, artifacts downloaded from the R2 mirror
|
|
# would have no signature file to verify against.
|
|
publishers:
|
|
- name: cloudflare-r2
|
|
checksum: true
|
|
signature: true
|
|
extra_files:
|
|
- glob: ./**.xz
|
|
- glob: ./**.sha256
|
|
cmd: sh scripts/upload-r2.sh {{ abs .ArtifactPath }} tea/{{ .Version }}/{{ .ArtifactName }}
|
|
env:
|
|
- R2_ENDPOINT={{ index .Env "R2_ENDPOINT" }}
|
|
- R2_BUCKET={{ index .Env "R2_BUCKET" }}
|
|
- R2_ACCESS_KEY_ID={{ index .Env "R2_ACCESS_KEY_ID" }}
|
|
- R2_SECRET_ACCESS_KEY={{ index .Env "R2_SECRET_ACCESS_KEY" }}
|
|
|
|
archives:
|
|
- format: binary
|
|
name_template: "{{ .Binary }}"
|
|
allow_different_binary_count: true
|
|
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
extra_files:
|
|
- glob: ./**.xz
|
|
|
|
force_token: gitea
|
|
|
|
signs:
|
|
-
|
|
signature: "${artifact}.sig"
|
|
artifacts: checksum
|
|
stdin: '{{ .Env.GPGSIGN_PASSPHRASE }}'
|
|
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
|
|
|
snapshot:
|
|
version_template: "{{ .Branch }}-devel"
|
|
|
|
nightly:
|
|
version_template: "{{ .Branch }}"
|
|
|
|
gitea_urls:
|
|
api: https://gitea.com/api/v1
|
|
download: https://gitea.com
|
|
|
|
release:
|
|
# Includes per-platform binary .xz artifacts and the docs archive
|
|
# tea-<version>-docs.tar.xz (references, man pages, bash/zsh/fish/powershell
|
|
# completions) produced by the before.hooks docs-archive step.
|
|
extra_files:
|
|
- glob: ./**.xz
|
|
- glob: ./**.xz.sha256
|
|
|
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
|
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|