File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change 9393
9494 - name : Set version to include mypyc suffix
9595 run : |
96- # Extract current version and add mypyc suffix
97- CURRENT_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
98- if [[ "${{ runner.os }}" == "macOS" ]]; then
99- sed -i '' "s/version = \"$CURRENT_VERSION\"/version = \"$CURRENT_VERSION+mypyc\"/" pyproject.toml
100- else
101- sed -i "s/version = \"$CURRENT_VERSION\"/version = \"$CURRENT_VERSION+mypyc\"/" pyproject.toml
102- fi
96+ # Replace only the first version line (project version) with mypyc suffix
97+ sed -i.bak '1,20s/^version = "\([^"]*\)"/version = "\1+mypyc"/' pyproject.toml
98+ rm pyproject.toml.bak
10399 shell : bash
104100
105101 - name : Install dependencies with mypyc extras
Original file line number Diff line number Diff line change @@ -104,13 +104,9 @@ jobs:
104104
105105 - name : Set version to include mypyc suffix
106106 run : |
107- # Extract current version and add mypyc suffix
108- CURRENT_VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
109- if [[ "${{ runner.os }}" == "macOS" ]]; then
110- sed -i '' "s/version = \"$CURRENT_VERSION\"/version = \"$CURRENT_VERSION+mypyc\"/" pyproject.toml
111- else
112- sed -i "s/version = \"$CURRENT_VERSION\"/version = \"$CURRENT_VERSION+mypyc\"/" pyproject.toml
113- fi
107+ # Replace only the first version line (project version) with mypyc suffix
108+ sed -i.bak '1,20s/^version = "\([^"]*\)"/version = "\1+mypyc"/' pyproject.toml
109+ rm pyproject.toml.bak
114110 shell : bash
115111
116112 - name : Install dependencies with mypyc extras
You can’t perform that action at this time.
0 commit comments