From 1445678afcb5a96d5a6c601f27e7a962cf52d5be Mon Sep 17 00:00:00 2001 From: Alexander Sharov Date: Sun, 16 Jun 2024 18:57:50 +0300 Subject: [PATCH] feat: add AUR publish to goreleaser Signed-off-by: Alexander Sharov --- .goreleaser.yml | 86 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 5 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 99896ac9..1a3e3e3d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -310,15 +310,13 @@ snapcrafts: publish: true summary: OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go. description: | - tenv is a versatile version manager for OpenTofu, Terraform, Terragrunt and Atmos, written in Go. - Our tool simplifies the complexity of handling different versions of these powerful tools, - ensuring developers and DevOps professionals + tenv is a versatile version manager for OpenTofu, Terraform, Terragrunt and Atmos, written in Go. + Our tool simplifies the complexity of handling different versions of these powerful tools, + ensuring developers and DevOps professionals can focus on what matters most - building and deploying efficiently. disable: 'false' channel_templates: - 'latest/stable' - - 'latest/candidate' - - 'latest/edge' grade: 'stable' confinement: strict license: Apache-2.0 @@ -349,6 +347,84 @@ snapcrafts: command: atmos aliases: [ atmos ] +aurs: + - name: tenv-bin + # Artifact IDs to filter for. + # Empty means all IDs (no filter). + ids: [] + homepage: "https://tofuutils.github.io/tenv/" + description: "OpenTofu, Terraform, Terragrunt, and Atmos version manager, written in Go." + maintainers: + - "Alexander Sharov " + contributors: + - "Alexander Sharov " + license: "Apache-2.0" + private_key: "{{ .Env.AUR_KEY }}" + git_url: "ssh://aur@aur.archlinux.org/tenv-bin.git" + skip_upload: false + provides: + - atmos + - tenv + - terraform + - terragrunt + - tf + - tofu + conflicts: + - atmos + - atmos-bin + - opentofu + - opentofu-bin + - opentofu-bin-stable + - opentofu-git + - terraform + - terragrunt + - tfenv + - tgenv + - tofuenv + depends: [] + optdepends: + - "cosign: package validation for OpenTofu" + backup: [] + package: |- + # bin + install -Dm 0755 "atmos" "${pkgdir}/usr/bin/atmos" + install -Dm 0755 "tenv" "${pkgdir}/usr/bin/tenv" + install -Dm 0755 "terraform" "${pkgdir}/usr/bin/terraform" + install -Dm 0755 "terragrunt" "${pkgdir}/usr/bin/terragrunt" + install -Dm 0755 "tf" "${pkgdir}/usr/bin/tf" + install -Dm 0755 "tofu" "${pkgdir}/usr/bin/tofu" + + # license + install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/licenses/tenv/LICENSE" + install -Dm 0644 "LICENSE" "${pkgdir}/usr/share/doc/tenv/LICENSE" + + # readme + install -Dm 0644 "README.md" "${pkgdir}/usr/share/doc/tenv/README.md" + + # completions + mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" + mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" + mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" + + for i in bash fish zsh; do + ./tenv completion $i > ./tenv.$i + done + + install -Dm644 "./tenv.bash" "${pkgdir}/usr/share/bash-completion/completions/tenv" + install -Dm644 "./tenv.zsh" "${pkgdir}/usr/share/zsh/site-functions/tenv" + install -Dm644 "./tenv.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/tenv.fish" + commit_author: + name: tofuutils + email: tofuutils@gmail.com + commit_msg_template: "Release tenv {{.Tag}}" + goamd64: v2 + + # Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null' + # git_ssh_command: "ssh -i {{ .Env.KEY }} -o SomeOption=yes" + + url_template: "https://github.com/tofuutils/tenv/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + directory: "." + # chocolateys: # - name: tenv # # Empty means all IDs.