File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,19 @@ jobs:
3535
3636 - name : Fetch remote package version
3737 run : |
38- packageRemoteVersion=$(python -c "exec(\"import pkg_resources\\ntry: print(pkg_resources.get_distribution('osw-incline').version)\\n except pkg_resources.DistributionNotFound: print('0.0.0'); \")")
38+ packageRemoteVersion=$(python -c "exec(\"import pkg_resources\\n try: print(pkg_resources.get_distribution('osw-incline').version)\\n except pkg_resources.DistributionNotFound: print('0.0.0')\\n finally: print('Done checking version') \")")
3939 echo "remoteVersion=$packageRemoteVersion" >> $GITHUB_ENV
4040
4141 - name : Printing local and remote versions
4242 run : echo "Local version ${{env.localVersion}} and remote version ${{env.remoteVersion}}"
4343
44- - name : Compare local and remote version with dpkg
45- run : dpkg --compare-versions ${{env.localVersion}} "gt" ${{env.remoteVersion}}
44+ - name : Compare local and remote versions
45+ run : |
46+ echo "Comparing versions..."
47+ if dpkg --compare-versions ${{env.localVersion}} "le" ${{env.remoteVersion}}; then
48+ echo "The remote version (${{env.remoteVersion}}) is greater than or equal to the local version (${{env.localVersion}}). Aborting deployment."
49+ exit 1
50+ fi
4651
4752
4853 - name : Setup python wheel
You can’t perform that action at this time.
0 commit comments