Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
else
VERSION="2.1.0-dev-${GITHUB_SHA::8}" # Default or non-tag build version
fi
# Use sed to directly update __version__ in __init__.py
sed -i "" -e "s/__version__ = '.*'/__version__ = '$VERSION'/" src/shortcircuit/__init__.py
# Update __version__ in __init__.py using python for cross-platform compatibility
python -c "import re; f='src/shortcircuit/__init__.py'; c=open(f).read(); open(f,'w').write(re.sub(r\"__version__ = '.*'\", f\"__version__ = '{VERSION}'\", c))"
echo "Version set to $VERSION in src/shortcircuit/__init__.py"

- name: Build Application
Expand Down Expand Up @@ -105,8 +105,8 @@ jobs:
else
VERSION="2.1.0-dev-${GITHUB_SHA::8}" # Default or non-tag build version
fi
# Use sed to directly update __version__ in __init__.py
sed -i "" -e "s/__version__ = '.*'/__version__ = '$VERSION'/" src/shortcircuit/__init__.py
# Update __version__ in __init__.py using python for cross-platform compatibility
python -c "import re; f='src/shortcircuit/__init__.py'; c=open(f).read(); open(f,'w').write(re.sub(r\"__version__ = '.*'\", f\"__version__ = '{VERSION}'\", c))"
echo "Version set to $VERSION in src/shortcircuit/__init__.py"

- name: Build Application
Expand Down
Loading