Skip to content

Commit

Permalink
Description, app version in cli, typo config
Browse files Browse the repository at this point in the history
Update application description
Add loginapp version and git hash for CLI -v option
Remove useless debug option from example
  • Loading branch information
fydrah committed Jul 17, 2018
1 parent 5301d2e commit 27edced
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
BINDIR := bin
GOFLAGS :=
LDFLAGS := -w -s
DOCKER_REPOSITORY := quay.io/fydrah/loginapp
GIT_REPOSITORY := github.com/fydrah/loginapp
GIT_COMMIT_ID := $(shell git log -n 1 --pretty=format:%h)
GIT_TAG := $(shell git describe --tags)
DOCKERFILES := dockerfiles

LDFLAGS = -w -s -X main.GitVersion=$(GIT_TAG) -X main.GitHash=$(GIT_COMMIT_ID)

.PHONY: all
all: build

Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

[![Docker Repository on Quay](https://quay.io/repository/fydrah/loginapp/status "Docker Repository on Quay")](https://quay.io/repository/fydrah/loginapp)

**Simple login CLI application for Kubernetes & OIDC**
**Simple application for Kubernetes CLI configuration with OIDC**

Original source code from [coreos/dex repository](https://github.com/coreos/dex/tree/master/cmd/example-app)

## Usage

```shell
NAME:
loginapp - Kube config application for OIDC
loginapp - Simple application for Kubernetes CLI configuration with OIDC

AUTHOR:
fydrah <[email protected]>
Expand All @@ -19,7 +19,7 @@ USAGE:
loginapp [global options] command [command options]

COMMANDS:
serve Run loginapp server
serve Run loginapp application
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
Expand All @@ -32,8 +32,6 @@ GLOBAL OPTIONS:
```yaml
# AppName
name: "Kubernetes Auth"
# Enable debug mode
debug: false
# Bind IP and port (format: "IP:PORT")
listen: "0.0.0.0:5555"
# OIDC relative configuration
Expand Down Expand Up @@ -98,8 +96,8 @@ EOF
docker-compose up -d
```

User: [email protected]
Password: password
* User: [email protected]
* Password: password

* Manage dependencies

Expand Down
11 changes: 8 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ import (
"github.com/cenkalti/backoff"
)

var logger = logrus.New()
var (
GitVersion = "X.X.X"
GitHash = "XXXXXXX"
logger = logrus.New()
)

/**
* Type def
Expand Down Expand Up @@ -316,7 +320,8 @@ GLOBAL OPTIONS:
{{range .VisibleFlags}}{{.}}
{{end}}{{end}}
`
app.UsageText = "Kube config application for OIDC"
app.UsageText = "Simple application for Kubernetes CLI configuration with OIDC"
app.Version = fmt.Sprintf("%v build %v", GitVersion, GitHash)
app.Authors = []cli.Author{
cli.Author{
Name: "fydrah",
Expand All @@ -326,7 +331,7 @@ GLOBAL OPTIONS:
app.Commands = []cli.Command{
{
Name: "serve",
Usage: "Run loginapp server",
Usage: "Run loginapp application",
SkipFlagParsing: true,
ArgsUsage: "[configuration file]",
Before: func(c *cli.Context) error {
Expand Down

0 comments on commit 27edced

Please sign in to comment.