diff --git a/ci/extract.sh b/ci/extract.sh index 514c321..cbd288d 100755 --- a/ci/extract.sh +++ b/ci/extract.sh @@ -5,15 +5,14 @@ VERSION=$1 mkdir -p dist cd dist -for osArch in "linux/amd64" "darwin/amd64" "darwin/arm64" "windows/amd64"; do +for osArch in "linux_amd64" "darwin_amd64" "darwin_arm64" "windows_amd64"; do os=$(echo "$osArch" | awk -F "_" '{print $1;}') - arch=$(echo "$osArch" | awk -F "_" '{print $2;}') zipFile='kubectl-vm_'"$VERSION"'_'"$osArch.zip" downloadURL="https://download.aerokube.com/boot/kubectl-vm/$VERSION/$zipFile" - outputFile='kubectl-vm_'"$os"'_'"$arch" + outputFile="kubectl-vm_$osArch" if [ "$os" == "windows" ]; then outputFile="$outputFile.exe" fi - curl -s "$downloadURL" | zcat >> "$outputFile" + curl -s "$downloadURL" | zcat > "$outputFile" chmod 755 "$outputFile" done