Skip to content

Commit

Permalink
add arm plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Lazarev committed Sep 7, 2022
1 parent 9d8ecae commit 1b332a0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
17 changes: 14 additions & 3 deletions scripts/install_plugin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh -e
set -xe

# Copied w/ love from the excellent hypnoglow/helm-s3

Expand All @@ -10,13 +11,23 @@ fi
version="$(cat plugin.yaml | grep "version" | cut -d '"' -f 2)"
echo "Downloading and installing helm-push v${version} ..."

arch=""
url=""
if [ "$(arch)" = "aarch64" ]; then
arch="arm64"
elif [ "$(arch)" = "arm" ] ; then
arch="arm64"
else
arch="amd64"
fi


if [ "$(uname)" = "Darwin" ]; then
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_darwin_amd64.tar.gz"
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_darwin_${arch}.tar.gz"
elif [ "$(uname)" = "Linux" ] ; then
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_linux_amd64.tar.gz"
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_linux_${arch}.tar.gz"
else
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_windows_amd64.tar.gz"
url="https://github.com/vivid-money/helm-plugin-render-values/releases/download/v${version}/helm-plugin-render-values_${version}_windows_${arch}.tar.gz"
fi

echo $url
Expand Down
20 changes: 12 additions & 8 deletions scripts/make-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@
VERSION="0.2.1"
mkdir -p assets

OS_LIST="darwin
linux
windows
OS_LIST="darwin/arm64
darwin/amd64
linux/arm64
linux/amd64
windows/amd64
"

mkdir assets/plugin
mkdir -p assets/plugin
cp plugin.yaml LICENSE assets/plugin/

for OS in $(echo $OS_LIST)
do
env GOOS=${OS} go build -o assets/plugin/render-values .
tar -czf assets/helm-plugin-render-values_${VERSION}_${OS}_amd64.tar.gz -C assets/plugin .
for OS_ARCH in $(echo $OS_LIST)
do
OS=${OS_ARCH%/*}
ARCH=${OS_ARCH#*/}
env GOOS=${OS} GOARCH=${ARCH} go build -o assets/plugin/render-values .
tar -czf assets/helm-plugin-render-values_${VERSION}_${OS}_${ARCH}.tar.gz -C assets/plugin .
done

0 comments on commit 1b332a0

Please sign in to comment.