mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-23 06:10:49 +01:00
Update project URLs and refactor Dockerfile
Project URLs have been changed in several files from "src.neessen.cloud/wneessen/apg-go" to "github.com/wneessen/apg-go". In addition, Dockerfile has been significantly refactored. It now includes steps for tidy and verify of Go modules and builds a statically linked binary. Several metadata files have been added with copyright information.
This commit is contained in:
parent
ff40c5d9f8
commit
cf47feecbb
9 changed files with 44 additions and 18 deletions
|
@ -11,5 +11,5 @@ enable = ["stylecheck", "whitespace", "containedctx", "contextcheck", "decorder"
|
|||
"errname", "errorlint", "gofmt", "gofumpt", "goimports"]
|
||||
|
||||
[linters-settings.goimports]
|
||||
local-prefixes = "src.neessen.cloud/wneessen/apg-go"
|
||||
local-prefixes = "github.com/wneessen/apg-go"
|
||||
|
||||
|
|
|
@ -49,15 +49,11 @@ archives:
|
|||
format: zip
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- "^docs:"
|
||||
- "^test:"
|
||||
use: github-native
|
||||
|
||||
nfpms:
|
||||
- vendor: Winni Neessen
|
||||
homepage: https://src.neessen.cloud/wneessen/apg-go
|
||||
homepage: https://github.com/wneessen/apg-go
|
||||
maintainer: Winni Neessen <wn@neessen.dev>
|
||||
description: |-
|
||||
A "Automated Password Generator"-clone written in Go
|
||||
|
@ -90,9 +86,7 @@ signs:
|
|||
sboms:
|
||||
- artifacts: archive
|
||||
|
||||
gitea_urls:
|
||||
api: https://src.neessen.cloud/api/v1
|
||||
download: https://src.neessen.cloud
|
||||
github_urls:
|
||||
|
||||
gomod:
|
||||
mod: mod
|
||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -1,3 +1,26 @@
|
|||
# SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
FROM golang:latest AS builder
|
||||
RUN mkdir /builddir
|
||||
ADD . /builddir/
|
||||
WORKDIR /builddir
|
||||
RUN go mod tidy
|
||||
RUN go mod download
|
||||
RUN go mod verify
|
||||
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
|
||||
FROM scratch
|
||||
ENTRYPOINT ["/apg"]
|
||||
COPY apg /
|
||||
LABEL maintainer="wn@neessen.dev"
|
||||
COPY ["docker-files/passwd", "/etc/passwd"]
|
||||
COPY ["docker-files/group", "/etc/group"]
|
||||
COPY --from=builder ["/etc/ssl/certs/ca-certificates.crt", "/etc/ssl/cert.pem"]
|
||||
COPY --chown=apg-go ["LICENSE", "/apg-go/LICENSE"]
|
||||
COPY --chown=apg-go ["README.md", "/apg-go/README.md"]
|
||||
COPY --from=builder --chown=apg-go ["/builddir/apg-go", "/apg-go/apg-go"]
|
||||
WORKDIR /apg-go
|
||||
USER apg-go
|
||||
ENTRYPOINT ["/apg-go/apg-go"]
|
|
@ -5,10 +5,10 @@ SPDX-License-Identifier: CC0-1.0
|
|||
-->
|
||||
|
||||
# A "Automated Password Generator"-clone
|
||||
[![Go Reference](https://pkg.go.dev/badge/src.neessen.cloud/wneessen/apg-go.svg)](https://pkg.go.dev/src.neessen.cloud/wneessen/apg-go)
|
||||
[![Go Report Card](https://goreportcard.com/badge/src.neessen.cloud/wneessen/apg-go)](https://goreportcard.com/report/src.neessen.cloud/wneessen/apg-go)
|
||||
[![Go Reference](https://pkg.go.dev/badge/github.com/wneessen/apg-go.svg)](https://pkg.go.dev/github.com/wneessen/apg-go)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/wneessen/apg-go)](https://goreportcard.com/report/github.com/wneessen/apg-go)
|
||||
[![#apg-go on Discord](https://img.shields.io/badge/Discord-%23apg%E2%80%93go-blue.svg)](https://discord.gg/ysQXkaccXk)
|
||||
[![REUSE status](https://api.reuse.software/badge/src.neessen.cloud/wneessen/apg-go)](https://api.reuse.software/info/src.neessen.cloud/wneessen/apg-go)
|
||||
[![REUSE status](https://api.reuse.software/badge/github.com/wneessen/apg-go)](https://api.reuse.software/info/github.com/wneessen/apg-go)
|
||||
<a href="https://ko-fi.com/D1D24V9IX"><img src="https://uploads-ssl.webflow.com/5c14e387dab576fe667689cf/5cbed8a4ae2b88347c06c923_BuyMeACoffee_blue.png" height="20" alt="buy ma a coffee"></a>
|
||||
|
||||
_apg-go_ is a simple APG-like password generator written in Go. It tries to replicate the
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"os"
|
||||
"runtime"
|
||||
|
||||
"src.neessen.cloud/wneessen/apg-go"
|
||||
"github.com/wneessen/apg-go"
|
||||
)
|
||||
|
||||
// MinimumAmountTooHigh is an error message displayed when a minimum amount of
|
||||
|
@ -169,7 +169,7 @@ func usage() {
|
|||
// Usage text
|
||||
const ut = `apg-go v` +
|
||||
apg.VERSION + "\n" +
|
||||
`A OSS "Automated Password Generator"-clone -- https://src.neessen.cloud/wneessen/apg-go/
|
||||
`A OSS "Automated Password Generator"-clone -- https://github.com/wneessen/apg-go/
|
||||
Created 2021-2024 by Winni Neessen (MIT licensed)
|
||||
|
||||
apg [-a <algo>] [-m <length>] [-x <length>] [-L] [-U] [-N] [-S] [-H] [-C]
|
||||
|
|
3
cosign.pub.license
Normal file
3
cosign.pub.license
Normal file
|
@ -0,0 +1,3 @@
|
|||
SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
||||
|
||||
SPDX-License-Identifier: CC0-1.0
|
3
docker-files/group.license
Normal file
3
docker-files/group.license
Normal file
|
@ -0,0 +1,3 @@
|
|||
SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
||||
|
||||
SPDX-License-Identifier: MIT
|
3
docker-files/passwd.license
Normal file
3
docker-files/passwd.license
Normal file
|
@ -0,0 +1,3 @@
|
|||
SPDX-FileCopyrightText: 2021-2024 Winni Neessen <wn@neessen.dev>
|
||||
|
||||
SPDX-License-Identifier: MIT
|
2
go.mod
2
go.mod
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
module src.neessen.cloud/wneessen/apg-go
|
||||
module github.com/wneessen/apg-go
|
||||
|
||||
go 1.22
|
||||
|
||||
|
|
Loading…
Reference in a new issue