Skip to content

Commit 69b8e03

Browse files
committed
Filter sbt version output
1 parent fd0bca8 commit 69b8e03

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ jobs:
143143
sbt_output="$(mktemp)"
144144
nix develop .#jdk${{ matrix.java }} --command \
145145
sbt --error cli/pack publishM2 publishLocal 'print cli/version' | tee "$sbt_output"
146-
SCIP_JAVA_VERSION="$(awk 'NF { value = $0 } END { print value }' "$sbt_output")"
146+
SCIP_JAVA_VERSION="$(
147+
sed -E $'s/\x1B\[[0-9;?]*[ -/]*[@-~]//g' "$sbt_output" |
148+
grep -E '^[0-9]+[.][0-9]+[.][0-9]+' |
149+
tail -n 1
150+
)"
147151
test -n "$SCIP_JAVA_VERSION"
148152
printf 'SCIP_JAVA_VERSION=%s\n' "$SCIP_JAVA_VERSION" >> "$GITHUB_ENV"
149153
printf 'SCIP_JAVA_CLI=%s\n' "$PWD/scip-java/target/pack/bin/scip-java" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)