Skip to content

Commit 22d1e7d

Browse files
authored
use v0.5.3 version
1 parent 7555e71 commit 22d1e7d

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ FROM alpine:latest
33
RUN apk add git curl
44
COPY download.sh /app/bin/
55

6-
# Download version v0.4.0
6+
# Download version v0.5.3
77
RUN mkdir -p /app/bin && \
88
cd /app/bin && \
9-
./download.sh "https://api.github.com/repos/fabien-marty/github-next-semantic-version/releases/182114439" && \
9+
./download.sh "https://api.github.com/repos/fabien-marty/github-next-semantic-version/releases/183066274" github-next-semantic-version && \
1010
chmod +x github-next-semantic-version
1111

1212
COPY entrypoint.sh /

Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ COPY download.sh /app/bin/
66
# Download version {{ VERSION }}
77
RUN mkdir -p /app/bin && \
88
cd /app/bin && \
9-
./download.sh "{{ URL }}" && \
9+
./download.sh "{{ URL }}" github-next-semantic-version && \
1010
chmod +x github-next-semantic-version
1111

1212
COPY entrypoint.sh /

download.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
#!/bin/sh
22

33
URL=$1
4+
NAME=$2
45
if test "${URL}" = ""; then
56
echo "ERROR: missing URL"
67
exit 1
78
fi
9+
if test "${NAME}" = ""; then
10+
echo "ERROR: missing NAME"
11+
exit 1
12+
fi
813
echo "URL=${URL}"
14+
echo "NAME=${NAME}"
915

10-
ARCH=${2:-linux-amd64}
16+
ARCH=${3:-linux-amd64}
1117
echo "ARCH=${ARCH}"
1218

19+
curl -s "${URL}" \
20+
| grep "browser_download_url" \
21+
| grep "${ARCH}" \
22+
| grep "/${NAME}/" \
23+
| grep -v "md5"
24+
1325
LOCATION=$(curl -s "${URL}" \
1426
| grep "browser_download_url" \
1527
| grep "${ARCH}" \
28+
| grep "/${NAME}-v" \
1629
| grep -v "md5" \
1730
| awk '{ print $2 }' \
1831
| sed 's/,$//' \

0 commit comments

Comments
 (0)