dockerutils/alpine-pkg-tag.sh

7 lines
175 B
Bash

#!/bin/sh
PKG_NAME=$1
apk add $PKG_NAME
VER=$(apk version $PKG_NAME | grep $PKG_NAME | sed -e "s/$PKG_NAME-\(.*\)\s*=.*/\1/" | awk '{$1=$1};1')
echo -n "$VER,latest" > .tags