Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail early when worktree dirty (#25)
Co-authored-by: brian shore <bshore@hashicorp.com>
- Loading branch information
1 parent
a7172d5
commit 941a719
Showing
12 changed files
with
256 additions
and
67 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
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,31 @@ | ||
#!/usr/bin/env bats | ||
|
||
set -Eeuo pipefail | ||
|
||
# This tests that we get the same verification zip path when we run the commands: | ||
# | ||
# - config | ||
# - inspect -build-config -verification | ||
# - build -verification | ||
@test "verification output paths match" { | ||
rm -rf dist/ out/ | ||
CONFIG="$(actions-go-build config | grep ZIP_PATH_VERIFICATION | grep -Eo '/.*$')" | ||
BUILDENV="$(actions-go-build inspect --build-config --verification | jq -r .Paths.ZipPath)" | ||
actions-go-build build -q | ||
BUILD="$(actions-go-build build -q -verification -json | jq -r .Config.Paths.ZipPath)" | ||
|
||
echo "$CONFIG" | ||
echo "$BUILDENV" | ||
echo "$BUILD" | ||
|
||
if [ "$CONFIG" != "$BUILDENV" ]; then | ||
echo "config vs. buildenv:" | ||
diff <(echo "$CONFIG") <(echo "$BUILDENV") | ||
fi | ||
if [ "$CONFIG" != "$BUILD" ]; then | ||
echo "config vs. build:" | ||
diff <(echo "$CONFIG") <(echo "$BUILD") | ||
fi | ||
|
||
[[ "$CONFIG" == "$BUILDENV" ]] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.