Skip to content

Commit

Permalink
Merge pull request #18 from chmouel/add-aur-brew
Browse files Browse the repository at this point in the history
Add AUR and brew packages to releases
  • Loading branch information
chmouel authored Dec 6, 2022
2 parents 3d25c7b + 5dfe53d commit caa395a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v3

- uses: alexellis/setup-arkade@v2
- uses: alexellis/arkade-get@master
with:
golangci-lint: latest

- name: Lint Go Code
run: |
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
make lint-go
build:
Expand Down
46 changes: 45 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ builds:
- amd64
- arm64
- s390x
- 386
- "386"
- mips64le
- ppc64le
archives:
Expand All @@ -41,3 +41,47 @@ changelog:
exclude:
- '^docs:'
- '^test:'

brews:
- name: opc
tap:
owner: openshift-pipelines
name: opc
folder: Formula
homepage: "https://github.com/openshift-pipelines/opc"
description: "A CLI for OpenShift Pipeline"
install: |
bin.install "opc" => "opc"
output = Utils.popen_read("SHELL=bash #{bin}/opc completion bash")
(bash_completion/"opc").write output
output = Utils.popen_read("SHELL=zsh #{bin}/opc completion zsh")
(zsh_completion/"_opc").write output
prefix.install_metafiles
aurs:
- homepage: "https://docs.openshift.com/container-platform/latest/cicd/pipelines/understanding-openshift-pipelines.html"
provides:
- openshift-pipelines-client
description: "A CLI for OpenShift Pipeline"
maintainers:
- "Openshift Pipelines <[email protected]>"
license: Apache 2.0
private_key: "{{ .Env.AUR_PRIVATE_KEY }}"
git_url: ssh://[email protected]/opc-bin.git
package: |-
# bin
install -Dm755 "./opc" "${pkgdir}/usr/bin/opc"
# license
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/opc/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
./opc completion zsh > opc.zsh
./opc completion bash > opc.bash
install -Dm644 "opc.bash" "${pkgdir}/usr/share/bash-completion/completions/opc"
install -Dm644 "opc.zsh" "${pkgdir}/usr/share/zsh/site-functions/_opc"

0 comments on commit caa395a

Please sign in to comment.