Skip to content

Commit

Permalink
add checksums for infractl
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen committed Nov 20, 2023
1 parent d3e4a58 commit a418c0f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ cli:
GOARCH=amd64 GOOS=darwin ./scripts/go-build -o bin/infractl-darwin-amd64 ./cmd/infractl
GOARCH=arm64 GOOS=darwin ./scripts/go-build -o bin/infractl-darwin-arm64 ./cmd/infractl
GOARCH=amd64 GOOS=linux ./scripts/go-build -o bin/infractl-linux-amd64 ./cmd/infractl
@./scripts/checksums

# cli-local - Builds the infractl client binary
# When run locally, a Darwin binary is built and installed into the user's GOPATH bin.
Expand Down
12 changes: 12 additions & 0 deletions scripts/checksums
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

main() {
local filename="infractl-CHECKSUMS"
pushd bin/ >/dev/null || exit 1
rm -f "${filename}"
shasum -a 512 -- infractl-* > "${filename}"
popd bin/ >/dev/null || exit 1

}

main "$@"
5 changes: 0 additions & 5 deletions scripts/go-build
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ main() {
# Current time in epoch seconds.
local BUILD_TIMESTAMP="$(date +'%s')"

# The URL for the CircleCI workflow that was run for the current commit.
local STABLE_CIRCLECI_WORKFLOW_URL
if [ -n "$CIRCLE_WORKFLOW_ID" ]; then
STABLE_CIRCLECI_WORKFLOW_URL="https://circleci.com/workflow-run/${CIRCLE_WORKFLOW_ID}"
fi

# The Git short SHA for the current commit.
local STABLE_GIT_SHORT_SHA="$(git rev-parse --short HEAD)"
Expand Down

0 comments on commit a418c0f

Please sign in to comment.