From d8454bea12a9122eb42251899f42fdf109298aa4 Mon Sep 17 00:00:00 2001 From: sh!zeeg Date: Fri, 10 Jan 2025 04:42:31 +0300 Subject: [PATCH] Fix make `ols version` work with GNU sed and BSD/macOS sed since GNU sed and BSD sed behave differently update VERSION using a temporary file --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index cd760bb..7b83cf3 100755 --- a/build.sh +++ b/build.sh @@ -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 $@