Skip to content

Commit

Permalink
install and use GNU sed (gsed) on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
tahina-pro committed Apr 10, 2023
1 parent f8c4825 commit a92641b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Install OCaml and other GNU build tools
# coreutils: for the `install` command used in install-ulib.sh
export OPAMYES=1
brew install opam bash gnu-getopt coreutils
brew install opam bash gnu-getopt coreutils gnu-sed
opam init --compiler=4.12.0
eval $(opam env)

Expand Down
3 changes: 2 additions & 1 deletion .scripts/publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pushd "$FSTAR_HOST_HOME"

echo "*** Rename package ***"
dev='~dev'
CURRENT_VERSION=$(cat version.txt | sed 's!'"$dev"'!!' | sed 's!'"\r"'$!!')
SED=$(which gsed >/dev/null 2>&1 && echo gsed || echo sed)
CURRENT_VERSION=$(cat version.txt | $SED 's!'"$dev"'!!' | $SED 's!'"\r"'$!!')
my_tag="v$CURRENT_VERSION"
if [[ -z $OS ]] ; then
OS=$(uname)
Expand Down
3 changes: 2 additions & 1 deletion .scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ fi
cd "$FSTAR_HOST_HOME"

# Strip the ~dev part of the version number
SED=$(which gsed >/dev/null 2>&1 && echo gsed || echo sed)
dev='~dev'
sed -i 's!'"$dev"'!!' version.txt
$SED -i 's!'"$dev"'!!' version.txt

# Build the package
if [[ -z "$CI_THREADS" ]] ; then
Expand Down

0 comments on commit a92641b

Please sign in to comment.