Skip to content

Commit 0d9fca4

Browse files
committed
Update build-and-publish-TestPyPI-dummy.yml
1 parent 8c43552 commit 0d9fca4

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

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

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,12 @@ jobs:
6262
python-version: ["3.9"]
6363
steps:
6464
- name: Checkout
65-
- uses: actions/checkout@v3
65+
uses: actions/checkout@v3
6666
with:
6767
ref: staging
6868
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
6969
fetch-depth: 0
70+
- run: git pull
7071
- name: Install Dependencies and check SDK versions
7172
run: |
7273
python -m venv venv_hardware_test
@@ -92,36 +93,36 @@ jobs:
9293
# current_version should be changed to something else. the new version should be compared to the current version from previous step and revert if it was incremented.
9394
echo "current_version=$(grep "version" setup.py | cut -d '"' -f2)" >> $GITHUB_ENV
9495
echo $current_version
95-
# - name: Handling Failure Delete tag
96-
# env:
97-
# commit_name: bot-edgepi
98-
# commit_email: bot@edgepi.com
99-
# login: bot-edgepi
100-
# token: "${{ secrets.ACTIONS_BOT_TOKEN }}"
101-
# run: |
102-
# set -x
103-
# # Setup Git env and user
104-
# git config user.name ${{ env.commit_name }}
105-
# git config user.email ${{ env.commit_email }}
106-
# git config --global pull.rebase false
107-
# BRANCH=${GITHUB_REF#refs/heads/}
108-
# git remote add ${{ env.login }} https://${{ env.login }}:${{ env.token }}@github.com/$GITHUB_REPOSITORY
109-
# git pull --no-edit ${{ env.login }} $BRANCH
110-
# git config --global url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf "https://github.com/"
111-
# # merge done by git pull does not update submodules changed in $BRANCH
112-
# git submodule update --init --recursive
96+
- name: Handling Failure Delete tag
97+
env:
98+
commit_name: bot-edgepi
99+
commit_email: bot@edgepi.com
100+
login: bot-edgepi
101+
token: "${{ secrets.ACTIONS_BOT_TOKEN }}"
102+
run: |
103+
set -x
104+
# Setup Git env and user
105+
git config user.name ${{ env.commit_name }}
106+
git config user.email ${{ env.commit_email }}
107+
git config --global pull.rebase false
108+
BRANCH=${GITHUB_REF#refs/heads/}
109+
git remote add ${{ env.login }} https://${{ env.login }}:${{ env.token }}@github.com/$GITHUB_REPOSITORY
110+
git pull --no-edit ${{ env.login }} $BRANCH
111+
git config --global url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf "https://github.com/"
112+
# merge done by git pull does not update submodules changed in $BRANCH
113+
git submodule update --init --recursive
113114
114-
# # # Delete Git tags
115-
# # git tag -d rc/v$current_version
116-
# # git push origin --delete rc/v$current_version
117-
# # git config --global --unset url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf
115+
# # Delete Git tags
116+
# git tag -d rc/v$current_version
117+
# git push origin --delete rc/v$current_version
118+
# git config --global --unset url."https://${{ env.login }}:${{ env.token }}@github.com/".insteadOf
118119
119-
# # # Decrementing the current version number
120-
# # my_var=$(echo $(grep "version" setup.py | cut -d '"' -f2 | cut -d '.' -f3))
121-
# # echo $((my_var-1))
122-
# # # Write the reverted version number back to setup file and
123-
# # sed -i "s/\(version=\"[0-9]\+\.[0-9]\+\.\)[0-9]\+\"/\1$my_var\"/" setup.py
124-
# # sed -i "s/\(current_version = [0-9]\+\.[0-9]\+\.\)[0-9]\+/\1$my_var/" .bumpversion.cfg
120+
# # Decrementing the current version number
121+
# my_var=$(echo $(grep "version" setup.py | cut -d '"' -f2 | cut -d '.' -f3))
122+
# echo $((my_var-1))
123+
# # Write the reverted version number back to setup file and
124+
# sed -i "s/\(version=\"[0-9]\+\.[0-9]\+\.\)[0-9]\+\"/\1$my_var\"/" setup.py
125+
# sed -i "s/\(current_version = [0-9]\+\.[0-9]\+\.\)[0-9]\+/\1$my_var/" .bumpversion.cfg
125126
126127
Bump_version_on_dev:
127128
name: Bump version numbers in Dev

0 commit comments

Comments
 (0)