Skip to content

Commit

Permalink
Update git version extraction
Browse files Browse the repository at this point in the history
it seems that new apk --quite only print package name not its version.
  • Loading branch information
zemanlx committed Aug 1, 2024
1 parent b3a7130 commit f24cb37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ image_tag=$(curl 'https://hub.docker.com/v2/repositories/library/node/tags/?page
| tail -n 1)

# Get major and minor version of git package for image_tag
git_version=$(docker run -i --rm "node:${image_tag}" apk --no-cache --quiet list 'git' | sed -r 's/^git-([0-9]+\.[0-9]+).*/\1/')
git_version=$(docker run -i --rm "node:${image_tag}" apk --no-cache list 'git' | grep "git-" | sed -r 's/^git-([0-9]+\.[0-9]+).*/\1/')

sed -i -r "s/^(FROM node:).+$/\1${image_tag}/" Dockerfile
sed -i -r "s/(git~=)[0-9]+.[0-9]+/\1${git_version}/" Dockerfile
Expand Down

0 comments on commit f24cb37

Please sign in to comment.