File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 2626 - name : Install dependencies
2727 run : |
2828 python -m pip install -U pip
29- sudo apt-get install wget grep
29+ sudo apt-get install wget grep jq
3030 - name : Compare version from pip and docker and set version
3131 id : getversion
3232 run : |
Original file line number Diff line number Diff line change @@ -8,16 +8,16 @@ pip_latest_version() {
88 python -m pip index versions commitizen | grep commitizen | grep -o -P ' [0-9]+\.[0-9]+\.[0-9]+'
99}
1010
11- # requires wget, sed, gnu awk
11+ # requires curl & jq
1212list_cz_docker_versions () {
13- image=commitizen/commitizen
14- wget -q " https://registry.hub.docker.com/v1/repositories/${image} /tags" -O - | sed -e ' s/[][]//g' -e ' s/"//g' -e ' s/ //g' | tr ' }' ' \n' | awk -F: ' {print $3}'
13+ curl -L -s ' https://registry.hub.docker.com/v2/repositories/commitizen/commitizen/tags/' | jq -r ' .results[].name'
1514}
1615
1716PIP_LATEST=$( pip_latest_version)
18- echo " latest pip version found ' $PIP_LATEST ' "
17+ printf " latest pip version found:\n%s\n\n " " $PIP_LATEST "
1918
2019tags=$( list_cz_docker_versions)
20+ printf " Docker hub tags found:\n%s\n\n" " $tags "
2121
2222if echo " ${tags} " | grep -q " $PIP_LATEST " ; then
2323 echo " Version already present, skipping other steps..."
2828 echo " Setting variable 'version'"
2929 echo " ::set-output name=version::$PIP_LATEST "
3030fi
31-
You can’t perform that action at this time.
0 commit comments