Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvAmBass committed Jul 6, 2024
1 parent e5b3dfd commit 992d794
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export IMG=$(docker build -q --pull --no-cache -t 'get-version' .)

export DEBIAN_VERSION=$(docker run --rm -t "$IMG" cat /etc/debian_version | tail -n1 | tr -d '\r')
export SSH_VERSION=$(docker run --rm -t "$IMG" dpkg --list openssh-server | grep '^ii' | sed 's/^[^0-9]*//g' | cut -d ' ' -f1 | sed 's/[+=~:]/_/g' | tr -d '\r')
export SSH_VERSION=$(docker run --rm -t "$IMG" dpkg --no-pager --list openssh-server | grep '^ii' | sed 's/^[^0-9]*//g' | cut -d ' ' -f1 | sed 's/[+=~:]/_/g' | tr -d '\r')
[ -z "$DEBIAN_VERSION" ] && exit 1

export IMGTAG=$(echo "$1""d$DEBIAN_VERSION-s$SSH_VERSION")
Expand All @@ -13,4 +13,4 @@ if [ "$IMAGE_EXISTS" -eq 0 ]; then
echo "$1""latest"
else
echo "$IMGTAG"
fi
fi

0 comments on commit 992d794

Please sign in to comment.