-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c2119b
commit 09292c8
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
# Build the pair of zip files to upload to lambda | ||
# TODO: This really ought to be something like a github action that does a release. | ||
# TODO: But it's better than mattm just knowing the commands! | ||
|
||
mkdir -p build | ||
DIR=$(mktemp -d "build/build-$(git rev-parse --short HEAD)-XXXXXX") | ||
echo "Building in $DIR" | ||
|
||
# Churner is just a binary | ||
mkdir -p "$DIR/churner" | ||
go build -o "$DIR/churner/churner" lambda/churner/churner.go | ||
# zip | ||
pushd "$DIR/churner" | ||
zip churner.zip churner | ||
popd | ||
|
||
|
||
# Checker binary and certs | ||
mkdir -p "$DIR/checker" | ||
go build -o "$DIR/checker/checker" lambda/checker/checker.go | ||
cp checker/testdata/stg-e1.pem "$DIR/checker/stg-int-e1-by-x2.pem" | ||
cp checker/testdata/stg-r3.pem "$DIR/checker/stg-int-r3-by-x1.pem" | ||
cp checker/testdata/e1.pem "$DIR/checker/prod-int-e1-by-x2.pem" | ||
cp checker/testdata/r3.pem "$DIR/checker/prod-int-r3-by-x1.pem" | ||
# zip | ||
pushd "$DIR/checker" | ||
zip checker.zip checker ./*.pem | ||
popd |