Skip to content

Commit 492fcee

Browse files
committed
Correct version bump re-writting for bot
1 parent f5b300b commit 492fcee

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

.github/workflows/pypi.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,11 @@ jobs:
2929
- name: Set env
3030
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3131

32-
- name: Print RELEASE_VERSION
33-
run: echo "${{ env.RELEASE_VERSION }}"
34-
35-
- name: Show version lines
36-
run: |
37-
grep 'version =' pyproject.toml
38-
grep '__version__' servicex_analysis_utils/__init__.py
39-
4032
- name: Update Version
4133
run: |
42-
sed -i '/version =/ s/= "[^"][^"]*"/ = "${{ env.RELEASE_VERSION }}"/' pyproject.toml
43-
sed -i '/__version__ =/ s/= "[^"][^"]*"/ = "${{ env.RELEASE_VERSION }}"/' servicex_analysis_utils/__init__.py
34+
sed -i 's/^version\s*=\s*".*"/version = "${{ env.RELEASE_VERSION }}"/' pyproject.toml
35+
sed -i '/__version__/ s/__version__\s*=.*/__version__ = "${{ env.RELEASE_VERSION }}"/' servicex_analysis_utils/__init__.py
4436
45-
- name: Show updated version lines
46-
run: |
47-
grep 'version =' pyproject.toml
48-
grep '__version__' servicex_analysis_utils/__init__.py
4937
5038
- name: Build a sdist and wheel
5139
run: |
@@ -112,10 +100,10 @@ jobs:
112100
- name: Set env
113101
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
114102

115-
- name: Update version in pyproject.toml and __init__.py
103+
- name: Update version to commit
116104
run: |
117-
sed -i '/version =/ s/= "[^"][^"]*"/ = "${{ env.RELEASE_VERSION }}"/' pyproject.toml
118-
sed -i '/__version__ =/ s/__version__ = "[^"]*"/__version__="${{ env.RELEASE_VERSION }}"/' servicex_analysis_utils/__init__.py
105+
sed -i 's/^version\s*=\s*".*"/version = "${{ env.RELEASE_VERSION }}"/' pyproject.toml
106+
sed -i '/__version__/ s/__version__\s*=.*/__version__ = "${{ env.RELEASE_VERSION }}"/' servicex_analysis_utils/__init__.py
119107
120108
121109
- name: Commit version change

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "servicex_analysis_utils"
7-
version = "1.0.0a4"
7+
version = "1.0.0a4"
88
description = "A package with analysis tools for ServiceX."
99
authors = [{name = "Artur Cordeiro Oudot Choi", email = "acordeir@cern.ch"}]
1010
readme = "README.md"

0 commit comments

Comments
 (0)