File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ ARG package
1010ARG package_version
1111
1212# Only add build tools for alpine image. The ubuntu based images have build tools already.
13+ # This command fails with a warning on Ubuntu (sh) and succeeds without issue on alpine (bash).
1314RUN if [[ "$build_target" == *"alpine" ]] ; then apk add build-base ; fi
1415
1516# Install packaer and build all dependencies.
Original file line number Diff line number Diff line change @@ -53,8 +53,18 @@ IMAGE_LOCATION=$REGISTRY/$IMAGE_REPOSITORY
5353TAG=" $IMAGE_LOCATION :py${PUBLISH_TARGET} -${PACKAGE_VERSION} "
5454
5555TAGS=" -t $TAG "
56+
57+ # For the latest version we do extra stuff.
5658if [[ ! -z $PACKAGE_LATEST_VERSION ]] && [[ $PACKAGE_LATEST_VERSION = $PACKAGE_VERSION ]]; then
5759 TAGS+=" -t $IMAGE_LOCATION :py${PUBLISH_TARGET} -LATEST"
60+
61+ VERSION_SHORTER=$( echo $PACKAGE_VERSION | | cut -d" ." -f1,2)
62+ TAGS+=" -t $IMAGE_LOCATION :py${PUBLISH_TARGET} -${VERSION_SHORTER} "
63+
64+ VERSION_SHORTERER=$( echo $PACKAGE_VERSION | | cut -d" ." -f1)
65+ if [[ $VERSION_SHORTERER != " 0" ]]; then
66+ TAGS+=" -t $IMAGE_LOCATION :py${PUBLISH_TARGET} -${VERSION_SHORTERER} "
67+ fi
5868fi
5969
6070
You can’t perform that action at this time.
0 commit comments