diff --git a/.github/workflows/releaser.yaml b/.github/workflows/releaser.yaml index 928dfb3..9ec7fdb 100644 --- a/.github/workflows/releaser.yaml +++ b/.github/workflows/releaser.yaml @@ -193,6 +193,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} update_packages: + if: startsWith(github.ref, 'refs/tags/') name: Update Homebrew formula needs: build runs-on: ubuntu-latest @@ -201,7 +202,6 @@ jobs: with: fetch-depth: 1 - name: Run update-formula.sh - if: startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AUR_PRIVATE_KEY: ${{ secrets.AUR_PRIVATE_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml deleted file mode 100644 index 1535a98..0000000 --- a/.goreleaser.yaml +++ /dev/null @@ -1,122 +0,0 @@ -project_name: snazy -builds: - - main: dummy.go - goos: - - darwin - - linux - - windows - goarch: - - amd64 - - arm64 - binary: snazy - hooks: - post: | - /bin/bash -xc " - cp -vf target/darwin_amd64/snazy/snazy dist/snazy_darwin_amd64_v1/snazy - cp -vf target/windows_amd64/snazy.exe/snazy.exe dist/snazy_windows_amd64_v1/snazy.exe - cp -vf target/linux_amd64/snazy/snazy dist/snazy_linux_amd64_v1/snazy - cp -vf target/linux_arm64/snazy/snazy dist/snazy_linux_arm64/snazy" -archives: - - name_template: >- - {{ .Binary }}_ - {{- .Version }}_ - {{- .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else if eq .Arch "darwin" }}MacOS - {{- else if eq .Arch "linux" }}Linux - {{- else if eq .Arch "windows" }}Windows - {{- else }}{{ .Arch }}{{ end }} - files: - - src: misc/completions/* - dst: completions - strip_parent: true - - LICENSE - - README.md -checksum: - name_template: "checksums.txt" - -brews: - - name: snazy - repository: - owner: chmouel - name: snazy - folder: Formula - homepage: "https://github.com/chmouel/snazy" - description: snazy - a snazzy json log viewer - install: | - bin.install "snazy" => "snazy" - prefix.install_metafiles - - output = Utils.popen_read("SHELL=bash #{bin}/snazy --shell-completion bash") - (bash_completion/"snazy").write output - - output = Utils.popen_read("SHELL=zsh #{bin}/snazy --shell-completion zsh") - (zsh_completion/"_snazy").write output - - output = Utils.popen_read("SHELL=fish #{bin}/snazy --shell-completion fish") - (fish_completion/"snazy.fish").write output - -nfpms: - - file_name_template: >- - snazy- - {{- .Version}}_{{.Os}}- - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else if eq .Arch "darwin" }}MacOS - {{- else if eq .Arch "linux" }}Linux - {{- else if eq .Arch "windows" }}Windows - {{- else }}{{ .Arch }}{{ end }} - homepage: https://github.com/chmouel/snazy - description: snazy - a snazzy json log viewer - maintainer: Chmouel Boudjnah - license: Apache 2.0 - formats: - - deb - - rpm - bindir: /usr/bin -changelog: - sort: asc - use: github - filters: - exclude: - - "^docs:" - - "^test:" - - "^Brew formula update" - - Merge pull request - - Merge branch - - go mod tidy - - Update README.md - - "[release] " - -universal_binaries: - - replace: true - name_template: "snazy" - -release: - prerelease: false - -aurs: - - name: snazy-bin - homepage: "https://github.com/chmouel/snazy" - description: "snazy - a snazzy json log viewer" - maintainers: - - "Chmouel Boudjnah " - license: Apache 2.0 - private_key: "{{ .Env.AUR_PRIVATE_KEY }}" - git_url: ssh://aur@aur.archlinux.org/snazy-bin.git - package: | - # bin - install -Dm755 "./snazy" "${pkgdir}/usr/bin/snazy" - - # license - install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/snazy/LICENSE" - - # 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/" - - ${pkgdir}/usr/bin/snazy --shell-completion=bash > "${pkgdir}/usr/share/bash-completion/completions/snazy" - ${pkgdir}/usr/bin/snazy --shell-completion=zsh > "${pkgdir}/usr/share/zsh/site-functions/_snazy" - ${pkgdir}/usr/bin/snazy --shell-completion=fish > "${pkgdir}/usr/share/fish/vendor_completions.d/snazy.fish" diff --git a/dummy.go b/dummy.go deleted file mode 100644 index 4eca9d4..0000000 --- a/dummy.go +++ /dev/null @@ -1,6 +0,0 @@ -package main - -// a dummy go file to fake goreleaser - -func main() { -}