9b0587b951
**Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> This PR modifies the `.goreleaser.yaml` file such that a PKGBUILD file for AUR deployment of clustertool is automatically generated and published. I followed the [AUR GoReleaser Documentation](https://goreleaser.com/customization/aur/). The `version_template` key is unsupported in modern versions of goreleaser, so I also replaced that key by `name_template`. **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code - [ ] 📜 Documentation Changes **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> - I ran `goreleaser release --snapshot --clean`: no errors / warnings - I ran `namcap -i PKGBUILD` on the newly generated file: no errors. **📃 Notes:** <!-- Please enter any other relevant information here --> Unfortunately, the [`metadata` section](https://goreleaser.com/customization/metadata/) of the `.goreleaser.yaml` file can only be used when using the pro version, so I had to duplicate some variables (maintainer, homepage, description, license) between the `aurs` and the `nfpms` sections. The previous description was a bit too generic for the AUR, so I changed it to make the package more easily understood. **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made changes to the documentation - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):`, `chore(chart-name):`, `docs(chart-name):` or `fix(docs):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._
95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
version: 2
|
|
project_name: clustertool
|
|
builds:
|
|
- id: clustertool
|
|
dir: clustertool
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- freebsd
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w -X main.Version={{.Version}} # Adjust path if necessary
|
|
gomod:
|
|
dir: ./clustertool
|
|
archives:
|
|
- name_template: "{{.ProjectName}}_{{ .Version }}_{{.Os}}_{{.Arch}}"
|
|
checksum:
|
|
name_template: "checksums.txt"
|
|
snapshot:
|
|
name_template: "{{ incpatch .Version }}-next"
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- '^Merge pull request #\d+ from'
|
|
- "^docs"
|
|
- "^test"
|
|
include:
|
|
- "clustertool"
|
|
- "Clustertool"
|
|
- "ClusterTool"
|
|
release:
|
|
name_template: "{{.ProjectName}}-{{.Tag}}"
|
|
github:
|
|
owner: truecharts
|
|
name: public
|
|
extra_files:
|
|
- glob: "clustertool/clustertool.LICENSE"
|
|
draft: false
|
|
make_latest: false
|
|
mode: append
|
|
|
|
git:
|
|
ignore_tags:
|
|
- nightly
|
|
- common
|
|
|
|
universal_binaries:
|
|
- replace: true
|
|
|
|
report_sizes: true
|
|
|
|
before:
|
|
hooks:
|
|
- chmod +x ./clustertool/partial_builds/partial_build.sh
|
|
- bash ./clustertool/partial_builds/partial_build.sh
|
|
- chmod +x ./clustertool/embed/download_talosctl.sh
|
|
- bash ./clustertool/embed/download_talosctl.sh
|
|
|
|
# sboms:
|
|
# - artifacts: archive
|
|
# - id: source
|
|
# artifacts: source
|
|
|
|
nfpms:
|
|
- package_name: clustertool
|
|
maintainer: "TrueCharts <info@truecharts.org>"
|
|
homepage: "https://truecharts.org"
|
|
description: "Tool to help bootstrap a Kubernetes cluster"
|
|
license: "BUSL-1.1"
|
|
vendor: TrueCharts
|
|
formats: [apk, deb, rpm, termux.deb, archlinux]
|
|
|
|
aurs:
|
|
- name: "clustertool-bin"
|
|
maintainers:
|
|
- "TrueCharts <info@truecharts.org>"
|
|
homepage: "https://truecharts.org"
|
|
description: "Tool to help bootstrap a Kubernetes cluster"
|
|
license: "BUSL-1.1"
|
|
git_url: "ssh://aur@aur.archlinux.org/clustertool-bin.git"
|
|
skip_upload: auto
|
|
package: |
|
|
# Install binary
|
|
bsdtar -xvf clustertool_${pkgver}_linux_${CARCH}.tar.gz -C "${pkgdir}"
|
|
install -Dm755 "${pkgdir}/clustertool" "${pkgdir}/usr/bin/clustertool"
|
|
|
|
# Install license
|
|
install -Dm644 "${pkgdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|