Skip to content

Commit

Permalink
Merge pull request #11 from foomo/vmware-tanzu/pinniped
Browse files Browse the repository at this point in the history
feat(vmware-tanzu/pinniped) add pinniped
  • Loading branch information
gnmsa authored Aug 5, 2024
2 parents 982edcd + 9c515b7 commit 5dc02b3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pinniped/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# VMware-tanzu


## Pinniped ([releases](https://github.com/vmware-tanzu/pinniped/releases))

```yaml
ownbrew:
packages:
- name: pinniped
tap: foomo/tap/vmware-tanzu/pinniped
version: 0.32.0
```
40 changes: 40 additions & 0 deletions pinniped/pinniped.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -e

# colors
CRed='\033[1;31m'
CGray='\033[0;37m'
CGreen='\033[1;32m'
CYellow='\033[1;33m'
NC='\033[0m'

# logging
info() {
echo -e "${CGray}${1}${NC}"
}

warn() {
echo -e "${CYellow}${1}${NC}"
}

error() {
echo -e "${CRed}${1}${NC}"
}

success() {
echo -e "${CGreen}${1}${NC}"
}

# vars
os="${os:-${1}}"
arch="${arch:-${2}}"
version="${version:-${3}}"

info "downloading ..."
curl -fL "https://github.com/vmware-tanzu/pinniped/releases/download/v${version}/pinniped-cli-${os}-${arch}" -o "${BIN_DIR}/pinniped-${version}-${os}-${arch}" --create-dirs

info "extracting ..."
chmod a+x "${BIN_DIR}/pinniped-${version}-${os}-${arch}"


5 changes: 5 additions & 0 deletions pinniped/pinniped_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

source .include/test.sh

test "$(dirname $0)/pinniped.sh" "0.32.0"

0 comments on commit 5dc02b3

Please sign in to comment.