github.com/kubernetes-incubator/kube-aws@v0.16.4/build-release-binaries (about)

     1  #!/bin/bash -e
     2  
     3  
     4  # Creates kubernetes-aws-$os-$arch.tar.gz in the current directory
     5  # for every combination of $os and $arch
     6  
     7  # Add OS support here
     8  for os in linux darwin;do
     9      # Add architecture support here
    10      for arch in amd64;do
    11  	output_folder="${os}-${arch}"
    12  	rm -rf "$output_folder"
    13  	mkdir "$output_folder"
    14  	echo "Building kube-aws for GOOS=${os} GOARCH=${arch}"
    15  	OUTPUT_PATH="$output_folder/kube-aws" BUILD_GOOS=$os BUILD_GOARCH=$arch ./build
    16  
    17  	releaseTar=kube-aws-"${os}-${arch}".tar.gz
    18  	rm -rf "$releaseTar"
    19  	tar czvf $releaseTar "$output_folder"
    20  	rm -rf "$output_folder"
    21  	echo "${os}-${arch} --> ${releaseTar}"
    22      done
    23  done
    24  echo "Done!"