Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
7135815
1
Parent(s):
a634267
Improve output format of backend update PR
Browse files
.github/workflows/update_backend.yml
CHANGED
@@ -44,31 +44,23 @@ jobs:
|
|
44 |
- name: "Update versions"
|
45 |
if: ${{ steps.get-latest.outputs.version != steps.get-current.outputs.version }}
|
46 |
run: |
|
47 |
-
git config --global user.name "${GITHUB_ACTOR}"
|
48 |
-
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
49 |
-
|
50 |
# Bump PySR patch number:
|
51 |
-
CURRENT_PYSR_PATCH_VERSION=$(python -c 'import pysr; print(pysr.version.__version__.split(".")[-1])' 2>/dev/null)
|
52 |
NEW_PYSR_PATCH_VERSION=$((CURRENT_PYSR_PATCH_VERSION + 1))
|
53 |
-
sed -i "s/^__version__ = .*/__version__ = \"$(python -c 'import pysr; print(".".join(pysr.version.__version__.split(".")[:-1]))' 2>/dev/null).${NEW_PYSR_PATCH_VERSION}\"/" pysr/version.py
|
54 |
|
55 |
# Set SymbolicRegression.jl version:
|
56 |
sed -i "s/^__symbolic_regression_jl_version__ = .*/__symbolic_regression_jl_version__ = \"${{ steps.get-latest.outputs.version }}\"/" pysr/version.py
|
57 |
|
58 |
-
git add pysr/version.py
|
59 |
-
git commit -m "Update backend version to v${{ steps.get-latest.outputs.version }}"
|
60 |
-
|
61 |
- name: "Create PR"
|
62 |
-
if: ${{ steps.get-latest.outputs.version != steps.get-current.outputs.version }}
|
63 |
uses: peter-evans/create-pull-request@v3
|
64 |
with:
|
65 |
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
66 |
title: "Automated update to backend: v${{ steps.get-latest.outputs.version }}"
|
67 |
body: |
|
68 |
-
This PR was automatically generated by the GitHub Action
|
69 |
-
[PySR backend update](.github/workflows/update-backend.yml).
|
70 |
|
71 |
-
It updates the backend version to v${{ steps.get-latest.outputs.version }}.
|
72 |
-
For a full description of the changes, see the backend
|
73 |
-
changelog: [v${{ steps.get-latest.outputs.version }}](https://github.com/MilesCranmer/SymbolicRegression.jl/releases/tag/v${{ steps.get-latest.outputs.version }}).
|
74 |
delete-branch: true
|
|
|
|
|
|
44 |
- name: "Update versions"
|
45 |
if: ${{ steps.get-latest.outputs.version != steps.get-current.outputs.version }}
|
46 |
run: |
|
|
|
|
|
|
|
47 |
# Bump PySR patch number:
|
48 |
+
CURRENT_PYSR_PATCH_VERSION=$(python -c 'import pysr; print(pysr.version.__version__.split(".")[-1], end="")' 2>/dev/null)
|
49 |
NEW_PYSR_PATCH_VERSION=$((CURRENT_PYSR_PATCH_VERSION + 1))
|
50 |
+
sed -i "s/^__version__ = .*/__version__ = \"$(python -c 'import pysr; print(".".join(pysr.version.__version__.split(".")[:-1]), end="")' 2>/dev/null).${NEW_PYSR_PATCH_VERSION}\"/" pysr/version.py
|
51 |
|
52 |
# Set SymbolicRegression.jl version:
|
53 |
sed -i "s/^__symbolic_regression_jl_version__ = .*/__symbolic_regression_jl_version__ = \"${{ steps.get-latest.outputs.version }}\"/" pysr/version.py
|
54 |
|
|
|
|
|
|
|
55 |
- name: "Create PR"
|
|
|
56 |
uses: peter-evans/create-pull-request@v3
|
57 |
with:
|
58 |
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
59 |
title: "Automated update to backend: v${{ steps.get-latest.outputs.version }}"
|
60 |
body: |
|
61 |
+
This PR was automatically generated by the GitHub Action `.github/workflows/update-backend.yml`
|
|
|
62 |
|
63 |
+
It updates the backend version to v${{ steps.get-latest.outputs.version }}. For a full description of the changes, see the backend changelog: [v${{ steps.get-latest.outputs.version }}](https://github.com/MilesCranmer/SymbolicRegression.jl/releases/tag/v${{ steps.get-latest.outputs.version }}).
|
|
|
|
|
64 |
delete-branch: true
|
65 |
+
commit-message: "Update backend version to v${{ steps.get-latest.outputs.version }}"
|
66 |
+
add-paths: pysr/version.py
|