Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail CI when examples fail to build #18

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions _example/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ export GO111MODULE=on
DIR=$(cd $(dirname $0); pwd)
BIN_DIR=$(cd $(dirname $(dirname $0)); pwd)/bin

RESULT=0

mkdir -p ${BIN_DIR}
go build -o ${BIN_DIR}/exec-command ${DIR}/exec-command/main.go
go build -o ${BIN_DIR}/http-prompt ${DIR}/http-prompt/main.go
go build -o ${BIN_DIR}/live-prefix ${DIR}/live-prefix/main.go
go build -o ${BIN_DIR}/simple-echo ${DIR}/simple-echo/main.go
go build -o ${BIN_DIR}/simple-echo-cjk-cyrillic ${DIR}/simple-echo/cjk-cyrillic/main.go
go build -o ${BIN_DIR}/even-lexer ${DIR}/even-lexer/main.go
go build -o ${BIN_DIR}/bang-executor ${DIR}/bang-executor/main.go
go build -o ${BIN_DIR}/automatic-indenter ${DIR}/automatic-indenter/main.go

for absolute in ${DIR}/*/; do
relative=${absolute#*_example}
relative=${relative%/}
go build -o ${BIN_DIR}${relative} ${absolute}/main.go || RESULT=1
done

exit $RESULT
1 change: 0 additions & 1 deletion _example/http-prompt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func executor(in string) {

func completer(in prompt.Document) ([]prompt.Suggest, istrings.RuneNumber, istrings.RuneNumber) {
endIndex := in.CurrentRuneIndex()
in.
w := in.GetWordBeforeCursor()
if w == "" {
return []prompt.Suggest{}, 0, 0
Expand Down
Loading