diff --git a/.github/workflows/publish_gh_release.yml b/.github/workflows/publish_gh_release.yml index 37e87ae5..759c6467 100644 --- a/.github/workflows/publish_gh_release.yml +++ b/.github/workflows/publish_gh_release.yml @@ -34,13 +34,6 @@ jobs: if: ${{ inputs.current_version != inputs.new_version }} steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - name: Upgrade pip and install dependencies - run: | - python3 -m pip install --upgrade pip - name: Update package version and change log run: | make update-version CURRENT_VERSION=${{ inputs.current_version }} NEW_VERSION=${{ inputs.new_version }} diff --git a/Makefile b/Makefile index 70967ccf..9eb203bd 100644 --- a/Makefile +++ b/Makefile @@ -68,8 +68,14 @@ endif @echo "Updating version from $(CURRENT_VERSION) to $(NEW_VERSION) for following files:" @for file in $(FILES); do \ echo " $$file"; \ - sed -i '' -e 's/__version__ = "$(CURRENT_VERSION)"/__version__ = "$(NEW_VERSION)"/' $$file; \ - sed -i '' -e 's/version = "$(CURRENT_VERSION)"/version = "$(NEW_VERSION)"/' $$file; \ - sed -i '' -e 's/version: "$(CURRENT_VERSION)"/version: "$(NEW_VERSION)"/' $$file; \ + if [ "$(shell uname)" = "Darwin" ]; then \ + sed -i '' -e 's/__version__ = "$(CURRENT_VERSION)"/__version__ = "$(NEW_VERSION)"/' \ + -e 's/version = "$(CURRENT_VERSION)"/version = "$(NEW_VERSION)"/' \ + -e 's/version: "$(CURRENT_VERSION)"/version: "$(NEW_VERSION)"/' $$file; \ + else \ + sed -i'' -e 's/__version__ = "$(CURRENT_VERSION)"/__version__ = "$(NEW_VERSION)"/' \ + -e 's/version = "$(CURRENT_VERSION)"/version = "$(NEW_VERSION)"/' \ + -e 's/version: "$(CURRENT_VERSION)"/version: "$(NEW_VERSION)"/' $$file; \ + fi; \ done @echo "Version update complete." \ No newline at end of file