Skip to content

Commit

Permalink
Define conditional options for sed
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler committed Sep 4, 2024
1 parent 4dfcaf7 commit fcd3f56
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,16 @@ jobs:
- name: Rename conda-forge packages
run: |
# Choose options to sed based on the OS (macos uses POSIX sed)
if [[ ${{ matrix.os }} == macos ]]; then
opts='-i " "'
else
opts='--in-place'
fi
echo "OPTS:" $opts
echo "Rename conda-forge packages in requirements-full.txt"
# Replace "build" for "python-build"
sed --in-place 's/^build$/python-build/' requirements-full.txt
sed -s $opts 's/^build$/python-build/' requirements-full.txt
echo "Renamed dependencies:"
cat requirements-full.txt
Expand Down

0 comments on commit fcd3f56

Please sign in to comment.