mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-22 13:50:49 +01:00
Dockerfile was accidentally forcing GOOS and GOARCH.
For each of use, the version now also prints out OS and ARCH
This commit is contained in:
parent
4b579200c7
commit
85c828801f
2 changed files with 3 additions and 1 deletions
|
@ -3,7 +3,7 @@ FROM golang:latest as builder
|
|||
RUN mkdir /builddir
|
||||
ADD . /builddir/
|
||||
WORKDIR /builddir
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w -s -extldflags "-static"' -o apg-go \
|
||||
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-w -s -extldflags "-static"' -o apg-go \
|
||||
github.com/wneessen/apg-go/cmd/apg
|
||||
|
||||
## Create scratch image
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/wneessen/go-hibp"
|
||||
"log"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
@ -57,6 +58,7 @@ func main() {
|
|||
// Show version and exit
|
||||
if cfgObj.ShowVersion {
|
||||
_, _ = os.Stderr.WriteString(`apg-go // A "Automated Password Generator"-clone v` + VersionString + "\n")
|
||||
_, _ = os.Stderr.WriteString("OS: " + runtime.GOOS + " // Arch: " + runtime.GOARCH + " \n")
|
||||
_, _ = os.Stderr.WriteString("(C) 2021 by Winni Neessen\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue