Skip to content

Commit

Permalink
Fix make ols version work with GNU sed and BSD/macOS sed
Browse files Browse the repository at this point in the history
since GNU sed and BSD sed behave differently
update VERSION using a temporary file
  • Loading branch information
shizeeg committed Jan 10, 2025
1 parent a9853fc commit d8454be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ fi

version="$(git describe --tags --abbrev=7)"
version="${version%-*}:${version##*-}"
sed -i "" "s|VERSION :: .*|VERSION :: \"${version}\"|g" src/main.odin
sed "s|VERSION :: .*|VERSION :: \"${version}\"|g" src/main.odin > /tmp/main.odin.build && mv -f /tmp/main.odin.build src/main.odin

odin build src/ -show-timings -collection:src=src -out:ols -microarch:native -no-bounds-check -o:speed $@

0 comments on commit d8454be

Please sign in to comment.