Skip to content

Commit 118afdf

Browse files
committed
only delete tags, do not decrement
- testPyPi doesn't let you upload package with the same filename. This means when job fails, delete the created tag but the version needs to be left bumped
1 parent c320c50 commit 118afdf

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

.github/workflows/build-and-publish-TestPyPI-dummy.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ jobs:
7575
# Delete Git tags
7676
git tag -d rc/v${{ env.current_version }}
7777
git push origin --delete rc/v${{ env.current_version }}
78-
79-
# # Decrementing the current version number
80-
my_var=$(echo $(grep "version" setup.py | cut -d '"' -f2 | cut -d '.' -f3))
81-
my_var=$(echo $((my_var-1)))
82-
# Write the reverted version number back to setup file and
83-
sed -i "s/\(version=\"[0-9]\+\.[0-9]\+\.\)[0-9]\+\"/\1$my_var\"/" setup.py
84-
sed -i "s/\(current_version = [0-9]\+\.[0-9]\+\.\)[0-9]\+/\1$my_var/" .bumpversion.cfg
85-
git add . && git commit -m "Failed Publish Job --- decremented version" && git push
8678
git config --global --unset url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf
87-
79+
80+
81+
# Decrementing the current version number
82+
# my_var=$(echo $(grep "version" setup.py | cut -d '"' -f2 | cut -d '.' -f3))
83+
# my_var=$(echo $((my_var-1)))
84+
Write the reverted version number back to setup file and
85+
# sed -i "s/\(version=\"[0-9]\+\.[0-9]\+\.\)[0-9]\+\"/\1$my_var\"/" setup.py
86+
# sed -i "s/\(current_version = [0-9]\+\.[0-9]\+\.\)[0-9]\+/\1$my_var/" .bumpversion.cfg
87+
# git add . && git commit -m "Failed Publish Job --- decremented version" && git push
8888

8989
Hardware_Test:
9090
needs: publish
@@ -144,15 +144,6 @@ jobs:
144144
# Delete Git tags
145145
git tag -d rc/v${{ env.expected_sdk_version }}
146146
git push origin --delete rc/v${{ env.expected_sdk_version }}
147-
148-
# Decrementing the current version number
149-
my_var=$(echo $(grep "version" setup.py | cut -d '"' -f2 | cut -d '.' -f3))
150-
my_var=$(echo $((my_var-1)))
151-
# Write the reverted version number back to setup file and
152-
sed -i "s/\(version=\"[0-9]\+\.[0-9]\+\.\)[0-9]\+\"/\1$my_var\"/" setup.py
153-
sed -i "s/\(current_version = [0-9]\+\.[0-9]\+\.\)[0-9]\+/\1$my_var/" .bumpversion.cfg
154-
155-
git add . && git commit -m "Failed Hardware Test Job ---- decremented version" && git push
156147
git config --global --unset url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf
157148
158149
Bump_version_on_dev:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setuptools.setup(
99
name="edgepi-python-sdk",
10-
version="1.2.21",
10+
version="1.2.22",
1111
author="S.Park",
1212
author_email="spark@osensa.com",
1313
description="EdgePi Python SDK package",

0 commit comments

Comments
 (0)