Skip to content

Commit

Permalink
Merge pull request #2890 from buildkite/shasums-file
Browse files Browse the repository at this point in the history
Add a SHA256SUMS file
  • Loading branch information
DrJosh9000 authored Jul 18, 2024
2 parents 5e1176f + eaf2d30 commit a41ccf2
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .buildkite/steps/build-github-release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -euo pipefail

echo '--- Getting agent version from build meta data'

export FULL_AGENT_VERSION=$(buildkite-agent meta-data get "agent-version-full")
export AGENT_VERSION=$(buildkite-agent meta-data get "agent-version")
export BUILD_VERSION=$(buildkite-agent meta-data get "agent-version-build")
FULL_AGENT_VERSION="$(buildkite-agent meta-data get "agent-version-full")"
AGENT_VERSION="$(buildkite-agent meta-data get "agent-version")"
BUILD_VERSION="$(buildkite-agent meta-data get "agent-version-build")"
export FULL_AGENT_VERSION
export AGENT_VERSION
export BUILD_VERSION

echo "Full agent version: $FULL_AGENT_VERSION"
echo "Agent version: $AGENT_VERSION"
echo "Build version: $BUILD_VERSION"
echo "Full agent version: ${FULL_AGENT_VERSION}"
echo "Agent version: ${AGENT_VERSION}"
echo "Build version: ${BUILD_VERSION}"

echo '--- Downloading binaries'

Expand All @@ -20,7 +23,7 @@ buildkite-agent artifact download "pkg/*" .
function build() {
echo "--- Building release for: $1"

./scripts/build-github-release.sh $1 $AGENT_VERSION
./scripts/build-github-release.sh $1 "${AGENT_VERSION}"
}

# Export the function so we can use it in xargs
Expand All @@ -31,3 +34,6 @@ rm -rf releases

# Loop over all the binaries and build them
ls pkg/* | xargs -I {} bash -c "build {}"

# Add a SHA256SUMS file
(cd releases ; sha256sum * > "buildkite-agent-${AGENT_VERSION}.SHA256SUMS")

0 comments on commit a41ccf2

Please sign in to comment.