-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from buildkite/triarius/clean-up-generation
- Loading branch information
Showing
10 changed files
with
177 additions
and
130 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,20 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -euf | ||
|
||
echo --- :hammer: Installing tools | ||
apk add --update-cache --no-progress git | ||
|
||
echo --- :golang: Generating code | ||
go generate ./... | ||
|
||
echo --- :git: Checking generated code matches commit | ||
# TODO: remove `-G.` once chmod 777 issue is fixed | ||
if ! git diff -G. --no-ext-diff --exit-code; then | ||
echo +++ :x: Generated code was not commited. | ||
echo "Run" | ||
echo " go generate ./..." | ||
echo "and make a commit." | ||
|
||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package api | ||
|
||
//go:generate go run github.com/Khan/genqlient | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
|
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
Oops, something went wrong.