Skip to content

Commit

Permalink
Merge pull request #2 from moul/dev/moul/template-post-clone
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Jun 8, 2021
2 parents d4d59d2 + 979e7c7 commit 0a4840a
Show file tree
Hide file tree
Showing 16 changed files with 101 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .all-contributorsrc
Expand Up @@ -29,7 +29,7 @@
}
],
"contributorsPerLine": 7,
"projectName": "golang-repo-template",
"projectName": "totp-cli",
"projectOwner": "moul",
"repoType": "github",
"repoHost": "https://github.com",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build the container image
uses: docker/build-push-action@v2.5.0
with:
repository: golang-repo-template
repository: totp-cli

- name: Push to GitHub Packages
uses: docker/build-push-action@v2.5.0
Expand All @@ -41,7 +41,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: moul/golang-repo-template/golang-repo-template
repository: moul/totp-cli/totp-cli
tag_with_ref: true

- name: Check Docker Hub Credentials
Expand Down Expand Up @@ -70,5 +70,5 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: moul/golang-repo-template
repository: moul/totp-cli
tag_with_ref: true
10 changes: 5 additions & 5 deletions .goreleaser.yml
Expand Up @@ -52,20 +52,20 @@ archives:
wrap_in_directory: true
brews:
-
name: golang-repo-template
name: totp-cli
# github:
# owner: moul
# name: homebrew-moul
commit_author:
name: moul-bot
email: "bot@moul.io"
homepage: https://github.com/moul/golang-repo-template
description: "golang-repo-template"
homepage: https://github.com/moul/totp-cli
description: "totp-cli"
nfpms:
-
file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
homepage: https://github.com/moul/golang-repo-template
description: "golang-repo-template"
homepage: https://github.com/moul/totp-cli
description: "totp-cli"
maintainer: "Manfred Touron <https://manfred.life>"
license: "Apache-2.0 OR MIT"
vendor: moul
Expand Down
6 changes: 0 additions & 6 deletions AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions COPYRIGHT
@@ -1,16 +1,16 @@
Copyright 2021 Manfred Touron and other golang-repo-template Developers.
Copyright 2021 Manfred Touron and other totp-cli Developers.

Intellectual Property Notice
----------------------------

golang-repo-template is licensed under the Apache License, Version 2.0
totp-cli is licensed under the Apache License, Version 2.0
(see LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or
the MIT license (see LICENSE-MIT or http://opensource.org/licenses/MIT),
at your option.

Copyrights and patents in the golang-repo-templates project are retained
Copyrights and patents in the totp-clis project are retained
by contributors.
No copyright assignment is required to contribute to golang-repo-template.
No copyright assignment is required to contribute to totp-cli.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Expand Up @@ -7,7 +7,7 @@ ARG VERSION
FROM golang:1.16.5-alpine as builder
RUN apk add --no-cache git gcc musl-dev make
ENV GO111MODULE=on
WORKDIR /go/src/moul.io/golang-repo-template
WORKDIR /go/src/moul.io/totp-cli
COPY go.* ./
RUN go mod download
COPY . ./
Expand All @@ -16,16 +16,16 @@ RUN make install
# minimalist runtime
FROM alpine:3.13
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="golang-repo-template" \
org.label-schema.name="totp-cli" \
org.label-schema.description="" \
org.label-schema.url="https://moul.io/golang-repo-template/" \
org.label-schema.url="https://moul.io/totp-cli/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/moul/golang-repo-template" \
org.label-schema.vcs-url="https://github.com/moul/totp-cli" \
org.label-schema.vendor="Manfred Touron" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
org.label-schema.cmd="docker run -i -t --rm moul/golang-repo-template" \
org.label-schema.help="docker exec -it $CONTAINER golang-repo-template --help"
COPY --from=builder /go/bin/golang-repo-template /bin/
ENTRYPOINT ["/bin/golang-repo-template"]
org.label-schema.cmd="docker run -i -t --rm moul/totp-cli" \
org.label-schema.help="docker exec -it $CONTAINER totp-cli --help"
COPY --from=builder /go/bin/totp-cli /bin/
ENTRYPOINT ["/bin/totp-cli"]
#CMD []
14 changes: 10 additions & 4 deletions Makefile
@@ -1,5 +1,5 @@
GOPKG ?= moul.io/golang-repo-template
DOCKER_IMAGE ?= moul/golang-repo-template
GOPKG ?= moul.io/totp-cli
DOCKER_IMAGE ?= moul/totp-cli
GOBINS ?= .
NPM_PACKAGES ?= .

Expand All @@ -8,8 +8,14 @@ include rules.mk
generate: install
GO111MODULE=off go get github.com/campoy/embedmd
mkdir -p .tmp
echo 'foo@bar:~$$ golang-repo-template hello world' > .tmp/usage.txt
golang-repo-template hello world 2>&1 >> .tmp/usage.txt
echo 'foo@bar:~$$ totp-cli JBSWY3DPEHPK3PXP' > .tmp/usage.txt
totp-cli JBSWY3DPEHPK3PXP 2>&1 >> .tmp/usage.txt
echo 'foo@bar:~$$ totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP' >> .tmp/usage.txt
totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP 2>&1 >> .tmp/usage.txt
echo 'foo@bar:~$$ sleep 30' >> .tmp/usage.txt
sleep 30
echo 'foo@bar:~$$ totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP' >> .tmp/usage.txt
totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP 2>&1 >> .tmp/usage.txt
embedmd -w README.md
rm -rf .tmp
.PHONY: generate
53 changes: 27 additions & 26 deletions README.md
@@ -1,48 +1,49 @@
# golang-repo-template
# totp-cli

:smile: golang-repo-template
:smile: totp-cli

[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/moul.io/golang-repo-template)
[![License](https://img.shields.io/badge/license-Apache--2.0%20%2F%20MIT-%2397ca00.svg)](https://github.com/moul/golang-repo-template/blob/main/COPYRIGHT)
[![GitHub release](https://img.shields.io/github/release/moul/golang-repo-template.svg)](https://github.com/moul/golang-repo-template/releases)
[![Docker Metrics](https://images.microbadger.com/badges/image/moul/golang-repo-template.svg)](https://microbadger.com/images/moul/golang-repo-template)
[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/moul.io/totp-cli)
[![License](https://img.shields.io/badge/license-Apache--2.0%20%2F%20MIT-%2397ca00.svg)](https://github.com/moul/totp-cli/blob/main/COPYRIGHT)
[![GitHub release](https://img.shields.io/github/release/moul/totp-cli.svg)](https://github.com/moul/totp-cli/releases)
[![Docker Metrics](https://images.microbadger.com/badges/image/moul/totp-cli.svg)](https://microbadger.com/images/moul/totp-cli)
[![Made by Manfred Touron](https://img.shields.io/badge/made%20by-Manfred%20Touron-blue.svg?style=flat)](https://manfred.life/)

[![Go](https://github.com/moul/golang-repo-template/workflows/Go/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3AGo)
[![Release](https://github.com/moul/golang-repo-template/workflows/Release/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3ARelease)
[![PR](https://github.com/moul/golang-repo-template/workflows/PR/badge.svg)](https://github.com/moul/golang-repo-template/actions?query=workflow%3APR)
[![GolangCI](https://golangci.com/badges/github.com/moul/golang-repo-template.svg)](https://golangci.com/r/github.com/moul/golang-repo-template)
[![codecov](https://codecov.io/gh/moul/golang-repo-template/branch/main/graph/badge.svg)](https://codecov.io/gh/moul/golang-repo-template)
[![Go Report Card](https://goreportcard.com/badge/moul.io/golang-repo-template)](https://goreportcard.com/report/moul.io/golang-repo-template)
[![CodeFactor](https://www.codefactor.io/repository/github/moul/golang-repo-template/badge)](https://www.codefactor.io/repository/github/moul/golang-repo-template)
[![Go](https://github.com/moul/totp-cli/workflows/Go/badge.svg)](https://github.com/moul/totp-cli/actions?query=workflow%3AGo)
[![Release](https://github.com/moul/totp-cli/workflows/Release/badge.svg)](https://github.com/moul/totp-cli/actions?query=workflow%3ARelease)
[![PR](https://github.com/moul/totp-cli/workflows/PR/badge.svg)](https://github.com/moul/totp-cli/actions?query=workflow%3APR)
[![GolangCI](https://golangci.com/badges/github.com/moul/totp-cli.svg)](https://golangci.com/r/github.com/moul/totp-cli)
[![codecov](https://codecov.io/gh/moul/totp-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/moul/totp-cli)
[![Go Report Card](https://goreportcard.com/badge/moul.io/totp-cli)](https://goreportcard.com/report/moul.io/totp-cli)
[![CodeFactor](https://www.codefactor.io/repository/github/moul/totp-cli/badge)](https://www.codefactor.io/repository/github/moul/totp-cli)

[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/moul/golang-repo-template)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/moul/totp-cli)

## Usage

[embedmd]:# (.tmp/usage.txt console)
```console
foo@bar:~$ golang-repo-template hello world
_ _ _ _
__ _ ___ | | __ _ _ _ __ _ ___ _ _ ___ _ __ ___ ___ | |_ ___ _ __ _ __ | | __ _ | |_ ___
/ _` |/ _ \| |/ _` || ' \ / _` ||___|| '_|/ -_)| '_ \/ _ \|___|| _|/ -_)| ' \ | '_ \| |/ _` || _|/ -_)
\__, |\___/|_|\__,_||_||_|\__, | |_| \___|| .__/\___/ \__|\___||_|_|_|| .__/|_|\__,_| \__|\___|
|___/ |___/ |_| |_|
12 CPUs, /home/moul/.gvm/pkgsets/go1.16/global/bin/golang-repo-template, fwrz, go1.16
args ["golang-repo-template","hello","world"]
foo@bar:~$ totp-cli JBSWY3DPEHPK3PXP
259247
foo@bar:~$ totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP
382939
259247
foo@bar:~$ sleep 30
foo@bar:~$ totp-cli HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ JBSWY3DPEHPK3PXP
691006
421766
```

## Install

### Using go

```sh
go get moul.io/golang-repo-template
go get moul.io/totp-cli
```

### Releases

See https://github.com/moul/golang-repo-template/releases
See https://github.com/moul/totp-cli/releases

## Contribute

Expand Down Expand Up @@ -73,7 +74,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://manfred.life"><img src="https://avatars1.githubusercontent.com/u/94029?v=4" width="100px;" alt=""/><br /><sub><b>Manfred Touron</b></sub></a><br /><a href="#maintenance-moul" title="Maintenance">🚧</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Documentation">📖</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Tests">⚠️</a> <a href="https://github.com/moul/golang-repo-template/commits?author=moul" title="Code">💻</a></td>
<td align="center"><a href="http://manfred.life"><img src="https://avatars1.githubusercontent.com/u/94029?v=4" width="100px;" alt=""/><br /><sub><b>Manfred Touron</b></sub></a><br /><a href="#maintenance-moul" title="Maintenance">🚧</a> <a href="https://github.com/moul/totp-cli/commits?author=moul" title="Documentation">📖</a> <a href="https://github.com/moul/totp-cli/commits?author=moul" title="Tests">⚠️</a> <a href="https://github.com/moul/totp-cli/commits?author=moul" title="Code">💻</a></td>
<td align="center"><a href="https://manfred.life/moul-bot"><img src="https://avatars1.githubusercontent.com/u/41326314?v=4" width="100px;" alt=""/><br /><sub><b>moul-bot</b></sub></a><br /><a href="#maintenance-moul-bot" title="Maintenance">🚧</a></td>
</tr>
</table>
Expand All @@ -87,7 +88,7 @@ specification. Contributions of any kind welcome!

### Stargazers over time

[![Stargazers over time](https://starchart.cc/moul/golang-repo-template.svg)](https://starchart.cc/moul/golang-repo-template)
[![Stargazers over time](https://starchart.cc/moul/totp-cli.svg)](https://starchart.cc/moul/totp-cli)

## License

Expand Down
10 changes: 5 additions & 5 deletions depaware.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc.go
Expand Up @@ -26,4 +26,4 @@
// |/ | | \ \ / / ' \/ _ \/ // / / |
// || | | | | | /_/_/_/\___/\_,_/_/ |
// +--------------------------------------------------------------+
package main // import "moul.io/golang-repo-template"
package main // import "moul.io/totp-cli"
15 changes: 9 additions & 6 deletions go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0a4840a

Please sign in to comment.