Skip to content

Commit 454e657

Browse files
committed
revert changes in toml file and added changes to update version number there
1 parent fe3afe5 commit 454e657

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,44 @@ jobs:
1717
with:
1818
python-version: ${{ env.PYTHON_VERSION }}
1919

20+
- name: set-release-env
21+
shell: bash
22+
run: |
23+
RELEASE_TAG="${{ github.event.release.tag_name }}"
24+
if [[ $RELEASE_TAG =~ ^v?([[:digit:]\.]+)(-rc)? ]]; then
25+
VERSION="${BASH_REMATCH[1]}"
26+
if [[ "${{ github.event.release.prerelease}}" == "true" ]]; then
27+
if [[ -z "${BASH_REMATCH[2]}" ]]; then
28+
echo "A test release tag should end with \"-rc\""
29+
exit 1
30+
fi
31+
32+
# for staging builds we append the build number so we have
33+
# distinct version numbers between prod and test pypi.
34+
VERSION="$VERSION.$GITHUB_RUN_NUMBER"
35+
fi
36+
37+
else
38+
echo "Unable to parse deployment version from $RELEASE_TAG"
39+
exit 1
40+
fi
41+
42+
echo "VERSION=$VERSION" >> $GITHUB_ENV
43+
44+
# ensure that the version file in the package will have the correct version
45+
# matching the name of the tag
46+
- name: update-version
47+
shell: bash
48+
run: |
49+
if [[ -n "$VERSION" ]]; then
50+
sed "s|\"latestVersion\":.*$|\"latestVersion\":\"$VERSION\",|g" synapseclient/synapsePythonClient > temp
51+
rm synapseclient/synapsePythonClient
52+
mv temp synapseclient/synapsePythonClient
53+
fi
54+
- id: update-version-number-in-toml
55+
run: |
56+
sed -i "s/version = \".*\"/version = \"$VERSION\"/g" pyproject.toml
57+
2058
- id: build-package
2159
run: |
2260
python3 -m pip install --upgrade pip

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "schematicpy"
3-
version = "99.1.1-rc.137"
3+
version = "25.2.2"
44
description = "Package for biomedical data model and metadata ingress management"
55
authors = [
66
"Milen Nikolov <milen.nikolov@sagebase.org>",

0 commit comments

Comments
 (0)