From ede4df5a97302c3906225baad7228586905f18eb Mon Sep 17 00:00:00 2001 From: Jeromy Streets Date: Tue, 15 Jun 2021 11:40:06 -0700 Subject: [PATCH] Updated Go version to 1.16.5. --- Dockerfile | 6 +++--- Dockerfile.all | 6 +++--- update.sh | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 6 deletions(-) create mode 100755 update.sh diff --git a/Dockerfile b/Dockerfile index c6ad207..2deb1ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ ################################################################################ ## GO BUILDER ################################################################################ -FROM golang:1.15.5 as builder +FROM golang:1.16.5 as builder -ENV VERSION 1.8.2 +ENV VERSION 1.8.4 ENV BUILD_DIR /build RUN mkdir -p ${BUILD_DIR} @@ -36,5 +36,5 @@ LABEL life.apets.vendor="Halverneus" \ life.apets.url="https://github.com/halverneus/static-file-server" \ life.apets.name="Static File Server" \ life.apets.description="A tiny static file server" \ - life.apets.version="v1.8.2" \ + life.apets.version="v1.8.4" \ life.apets.schema-version="1.0" diff --git a/Dockerfile.all b/Dockerfile.all index 206c6ab..0bc4d5a 100644 --- a/Dockerfile.all +++ b/Dockerfile.all @@ -1,6 +1,6 @@ -FROM golang:1.15.5 as builder +FROM golang:1.16.5 as builder -ENV VERSION 1.8.2 +ENV VERSION 1.8.4 ENV BUILD_DIR /build RUN mkdir -p ${BUILD_DIR} @@ -21,5 +21,5 @@ LABEL life.apets.vendor="Halverneus" \ life.apets.url="https://github.com/halverneus/static-file-server" \ life.apets.name="Static File Server" \ life.apets.description="A tiny static file server" \ - life.apets.version="v1.8.2" \ + life.apets.version="v1.8.4" \ life.apets.schema-version="1.0" diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..ac1f0ef --- /dev/null +++ b/update.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e + +if [ $# -eq 0 ] ; then + echo "Usage: ./update.sh v#.#.#" + exit +fi + +VERSION=$1 + +docker build -t sfs-builder -f ./Dockerfile.all . + +ID=$(docker create sfs-builder) + +rm -rf out +mkdir -p out +docker cp $ID:/build/pkg/linux-amd64/serve ./out/static-file-server-$VERSION-linux-amd64 +docker cp $ID:/build/pkg/linux-i386/serve ./out/static-file-server-$VERSION-linux-386 +docker cp $ID:/build/pkg/linux-arm6/serve ./out/static-file-server-$VERSION-linux-arm6 +docker cp $ID:/build/pkg/linux-arm7/serve ./out/static-file-server-$VERSION-linux-arm7 +docker cp $ID:/build/pkg/linux-arm64/serve ./out/static-file-server-$VERSION-linux-arm64 +docker cp $ID:/build/pkg/darwin-amd64/serve ./out/static-file-server-$VERSION-darwin-amd64 +docker cp $ID:/build/pkg/win-amd64/serve.exe ./out/static-file-server-$VERSION-windows-amd64.exe + +docker rm -f $ID +docker rmi sfs-builder + +docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag halverneus/static-file-server:$VERSION . +docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag halverneus/static-file-server:latest . + +echo "Done" \ No newline at end of file