github.com/discordapp/buildkite-agent@v2.6.6+incompatible/scripts/build-debian-packages.sh (about) 1 #!/bin/bash 2 set -e 3 4 echo '--- Getting agent version from build meta data' 5 6 export FULL_AGENT_VERSION=$(buildkite-agent meta-data get "agent-version-full") 7 export AGENT_VERSION=$(buildkite-agent meta-data get "agent-version") 8 export BUILD_VERSION=$(buildkite-agent meta-data get "agent-version-build") 9 10 echo "Full agent version: $FULL_AGENT_VERSION" 11 echo "Agent version: $AGENT_VERSION" 12 echo "Build version: $BUILD_VERSION" 13 14 function build() { 15 echo "--- Building debian package $1/$2" 16 17 BINARY_FILENAME="pkg/buildkite-agent-$1-$2" 18 19 # Download the built binary artifact 20 buildkite-agent artifact download $BINARY_FILENAME . 21 22 # Make sure it's got execute permissions so we can extract the version out of it 23 chmod +x $BINARY_FILENAME 24 25 # Build the debian package using the architectre and binary, they are saved to deb/ 26 ./scripts/utils/build-linux-package.sh "deb" $2 $BINARY_FILENAME $AGENT_VERSION $BUILD_VERSION 27 } 28 29 echo '--- Installing dependencies' 30 bundle 31 32 # Make sure we have a clean deb folder 33 rm -rf deb 34 35 # Build the packages into deb/ 36 build "linux" "amd64" 37 build "linux" "386" 38 build "linux" "arm" 39 build "linux" "armhf" 40 build "linux" "arm64"