Skip to content

Commit 41db5c1

Browse files
committed
fixed workflow to support spaces in metadata/pyroject.toml files
1 parent 6a6a25e commit 41db5c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build_and_release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ jobs:
7373
- name: Install dependencies
7474
run: python3 -m pip install --upgrade setuptools wheel twine
7575
- name: Update version in setup.py (dspy)
76-
run: sed -i '/#replace_package_version_marker/{n;s/__version__="[^"]*"/__version__="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/__metadata__.py
76+
run: sed -i '/#replace_package_version_marker/{n;s/__version__ *= *"[^"]*"/__version__="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/__metadata__.py
7777
- name: Update version in pyproject.toml
78-
run: sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' pyproject.toml
78+
run: sed -i '/#replace_package_version_marker/{n;s/version *= *"[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' pyproject.toml
7979
# Publish to dspy
8080
- name: Update package name in setup.py
8181
run: |
82-
sed -i '/#replace_package_name_marker/{n;s/__name__="[^"]*"/__name__="dspy"/;}' ./dspy/__metadata__.py
82+
sed -i '/#replace_package_name_marker/{n;s/__name__ *= *"[^"]*"/__name__="dspy"/;}' ./dspy/__metadata__.py
8383
- name: Update package name in pyproject.toml
84-
run: sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy"/;}' pyproject.toml
84+
run: sed -i '/#replace_package_name_marker/{n;s/name *= *"[^"]*"/name="dspy"/;}' pyproject.toml
8585
# Remove pyproject.toml temporarily to avoid conflicts
8686
- name: Temporarily remove pyproject.toml
8787
run: mv pyproject.toml pyproject.toml.bak
@@ -93,9 +93,9 @@ jobs:
9393
attestations: false
9494
# Publish to dspy-ai
9595
- name: Update version in setup.py (dspy-ai)
96-
run: sed -i '/#replace_package_version_marker/{n;s/version="[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/.internal_dspyai/setup.py
96+
run: sed -i '/#replace_package_version_marker/{n;s/version *= *"[^"]*"/version="${{ needs.extract-tag.outputs.version }}"/;}' ./dspy/.internal_dspyai/setup.py
9797
- name: Update package name in setup.py
98-
run: sed -i '/#replace_package_name_marker/{n;s/name="[^"]*"/name="dspy-ai"/;}' ./dspy/.internal_dspyai/setup.py
98+
run: sed -i '/#replace_package_name_marker/{n;s/name *= *"[^"]*"/name="dspy-ai"/;}' ./dspy/.internal_dspyai/setup.py
9999
- name: Update dspy dependency version in setup.py
100100
run: |
101101
sed -i '/#replace_dspy_version_marker/{n;s/dspy>=[^"]*/dspy>=${{ needs.extract-tag.outputs.version }}/;}' ./dspy/.internal_dspyai/setup.py

0 commit comments

Comments
 (0)