diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index c3f9b22..1c5c5dd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -20,15 +20,6 @@ jobs: with: go-version-file: go.mod - # - name: Install GoReleaser - # run: go install github.com/goreleaser/goreleaser@master - - # - name: Run GoReleaser - # run: goreleaser release - # env: - # GITHUB_TOKEN: ${{ secrets.TOKEN }} - # AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }} - - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: diff --git a/.gitignore b/.gitignore index 6fcfe8e..bad70b1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,3 @@ config.toml # generated /db nohup.out - -dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0abf7ad..043c012 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -23,7 +23,7 @@ builds: archives: - id: fhome - name_template: 'fhome_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + name_template: "fhome_{{ .Version }}_{{ .Os }}_{{ .Arch }}" builds: - fhome files: @@ -37,7 +37,7 @@ archives: format: zip - id: fhomed - name_template: 'fhomed_{{ .Version }}_{{ .Os }}_{{ .Arch }}' + name_template: "fhomed_{{ .Version }}_{{ .Os }}_{{ .Arch }}" builds: - fhomed files: @@ -51,38 +51,38 @@ archives: format: zip changelog: - skip: true + disable: true -# brews: -# - name: fhome -# ids: -# - fhome -# repository: -# owner: bartekpacia -# name: homebrew-tools -# folder: Formula -# homepage: https://github.com/bartekpacia/fhome -# description: Interact with smart home devices connected to F&Home -# license: MIT -# install: | -# bin.install "fhome" -# bash_completion.install "autocomplete/bash_autocomplete_fhome" => "fhome" -# zsh_completion.install "autocomplete/zsh_autocomplete_fhome" => "_fhome" +brews: + - name: fhome + ids: + - fhome + repository: + owner: bartekpacia + name: homebrew-tools + folder: Formula + homepage: https://github.com/bartekpacia/fhome + description: Interact with smart home devices connected to F&Home + license: MIT + install: | + bin.install "fhome" + bash_completion.install "autocomplete/bash_autocomplete_fhome" => "fhome" + zsh_completion.install "autocomplete/zsh_autocomplete_fhome" => "_fhome" -# - name: fhomed -# ids: -# - fhomed -# repository: -# owner: bartekpacia -# name: homebrew-tools -# folder: Formula -# homepage: https://github.com/bartekpacia/fhome -# description: Background daemon for F&Home -# license: MIT -# install: | -# bin.install "fhomed" -# bash_completion.install "autocomplete/bash_autocomplete_fhomed" => "fhomed" -# zsh_completion.install "autocomplete/zsh_autocomplete_fhomed" => "_fhomed" + - name: fhomed + ids: + - fhomed + repository: + owner: bartekpacia + name: homebrew-tools + folder: Formula + homepage: https://github.com/bartekpacia/fhome + description: Background daemon for F&Home + license: MIT + install: | + bin.install "fhomed" + bash_completion.install "autocomplete/bash_autocomplete_fhomed" => "fhomed" + zsh_completion.install "autocomplete/zsh_autocomplete_fhomed" => "_fhomed" aurs: - name: fhome-bin @@ -92,16 +92,17 @@ aurs: description: Interact with smart home devices connected to F&Home maintainers: - Bartek Pacia - private_key: '{{ .Env.AUR_SSH_KEY }}' + private_key: "{{ .Env.AUR_SSH_KEY }}" git_url: git@github.com:bartekpacia/aur.git directory: fhome-bin + commit_msg_template: update fhome to {{ .Tag }} package: | cd "$pkgname-$pkgver" # bin install -Dm755 fhome "${pkgdir}/usr/bin/fhome" # license - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/mybin/LICENSE" + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/fhome/LICENSE" # completions mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" @@ -111,3 +112,31 @@ aurs: # man pages # install -Dm644 "./manpages/mybin.1.gz" "${pkgdir}/usr/share/man/man1/mybin.1.gz" + + - name: fhomed-bin + ids: + - fhomed + homepage: https://github.com/bartekpacia/fhome + description: Background daemon for F&Home + maintainers: + - Bartek Pacia + private_key: "{{ .Env.AUR_SSH_KEY }}" + git_url: git@github.com:bartekpacia/aur.git + directory: fhomed-bin + commit_msg_template: update fhomed to {{ .Tag }} + package: | + cd "$pkgname-$pkgver" + # bin + install -Dm755 fhomed "${pkgdir}/usr/bin/fhomed" + + # license + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/fhomed/LICENSE" + + # completions + mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" + mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" + install -Dm755 autocomplete/bash_autocomplete_fhomed "${pkgdir}/usr/share/bash-completion/completions/fhomed" + install -Dm755 autocomplete/zsh_autocomplete_fhomed "${pkgdir}/usr/share/zsh/site-functions/_fhomed" + + # man pages + # install -Dm644 "./manpages/mybin.1.gz" "${pkgdir}/usr/share/man/man1/mybin.1.gz"