From 93600f223f74f2a84029dc6b161218dd1f4fa394 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 10 May 2023 19:56:26 +0200 Subject: [PATCH] git fetch through plugin --- Dockerfile | 2 +- plugin.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f754e2c..941afdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY plugin.sh ./ RUN dos2unix plugin.sh FROM registry.odit.services/hub/library/node:20.0.0-alpine3.17 -RUN apk add curl git jq pandoc --no-cache --update && rm -rf /var/cache/apk/* +RUN apk add curl git openssh patch jq pandoc --no-cache --update && rm -rf /var/cache/apk/* # add the wrapper which acts as a drone plugin COPY --from=BUILD /app/plugin.sh /plugin.sh diff --git a/plugin.sh b/plugin.sh index 2b9e28c..9584ebc 100644 --- a/plugin.sh +++ b/plugin.sh @@ -1,7 +1,7 @@ #!/bin/sh set -euo pipefail -# git fetch +git fetch --tags CURRENTTAG=$(git tag --sort=-taggerdate | head -n 1) PREVIOUSTAG=$(git tag --sort=-taggerdate | head -n 2 | tail -n 1)