Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 539f232

Browse files
committed
fix: use docker v2 api
Closes #9
1 parent 120c7ee commit 539f232

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

‎.github/workflows/publish-container.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
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: |

‎scripts/auto_publish/compare-versions‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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
1212
list_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

1716
PIP_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

2019
tags=$(list_cz_docker_versions)
20+
printf "Docker hub tags found:\n%s\n\n" "$tags"
2121

2222
if echo "${tags}" | grep -q "$PIP_LATEST"; then
2323
echo "Version already present, skipping other steps..."
@@ -28,4 +28,3 @@ else
2828
echo "Setting variable 'version'"
2929
echo "::set-output name=version::$PIP_LATEST"
3030
fi
31-

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /