Skip to content

Commit

Permalink
Package binaries, print sha256 hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Sep 11, 2017
1 parent 88c9515 commit 59c0ddc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v0.1.0

* Initial release
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

audit2rbac takes a [Kubernetes audit log](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) and username as input, and generates [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/) role and binding objects that cover all the API requests made by that user.

audit2rbac is in the nascent stages of development, has [known issues](https://github.com/liggitt/audit2rbac/issues?q=is%3Aissue+is%3Aopen+label%3Abug), and will change internal and external interfaces before a stable release.
audit2rbac is in the nascent stages of development, and will change internal and external interfaces before a stable release.

* [Release history](CHANGELOG.md)
* [Known issues](https://github.com/liggitt/audit2rbac/issues?q=is%3Aissue+is%3Aopen+label%3Abug)

## User Instructions

Expand Down Expand Up @@ -49,7 +52,6 @@ audit2rbac is in the nascent stages of development, has [known issues](https://g
rolebinding "audit2rbac:my-user" created
```


## Developer Instructions

Requirements:
Expand Down
6 changes: 6 additions & 0 deletions build/build-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,18 @@ for PLATFORM in $PLATFORMS; do

BIN_DIR="bin/${GOOS}/${GOARCH}"
BIN_FILENAME="${BIN_DIR}/${OUTPUT}"
TAR_FILENAME="bin/${OUTPUT}-${GOOS}-${GOARCH}.tar.gz"
if [[ "${GOOS}" == "windows" ]]; then BIN_FILENAME="${BIN_FILENAME}.exe"; fi

mkdir -p "${BIN_DIR}"
rm -f "${BIN_FILENAME}"
rm -f "${TAR_FILENAME}"

CMD="GOARM=${GOARM} GOOS=${GOOS} GOARCH=${GOARCH} go build -o ${BIN_FILENAME} $($(dirname "${BASH_SOURCE}")/print-ldflags.sh) $@"

echo "${CMD}"
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}"
tar -czf "${TAR_FILENAME}" "${BIN_FILENAME}"
done

# eval errors
Expand All @@ -96,3 +100,5 @@ if [[ "${FAILURES}" != "" ]]; then
echo "${SCRIPT_NAME} failed on: ${FAILURES}"
exit 1
fi

$(dirname "${BASH_SOURCE}")/print-shasum.sh
9 changes: 9 additions & 0 deletions build/print-shasum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

root="$(dirname "${BASH_SOURCE}")/../bin"

echo "filename | sha256 hash"
echo "-------- | -----------"
for file in $(find $root -name *.tar.gz); do
echo "$(basename $file) | $(shasum -b -a 256 $file | cut -f 1 -d ' ')"
done

0 comments on commit 59c0ddc

Please sign in to comment.