Skip to content

Commit

Permalink
Merge pull request #18 from elk-language/feature/fix_examples
Browse files Browse the repository at this point in the history
Fail CI when examples fail to build
  • Loading branch information
Verseth committed Aug 15, 2023
2 parents 1ccfc35 + 7586f92 commit 9e0dcfb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
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
File renamed without changes.

0 comments on commit 9e0dcfb

Please sign in to comment.