From 56896530f6eca423e4c6ae9918b48b155300b64c Mon Sep 17 00:00:00 2001 From: moualhi zine el abidine Date: Mon, 13 Nov 2023 15:44:44 +0100 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=F0=9F=90=9B:=20updating=20help=20com?= =?UTF-8?q?mand=20with=20the=20new=20flags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cmd/goji.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cmd/goji.go b/src/cmd/goji.go index bb26274..d69b5ac 100644 --- a/src/cmd/goji.go +++ b/src/cmd/goji.go @@ -24,7 +24,6 @@ var ( func main() { - helpFlag := flag.Bool("h", false, "Display help information") flag.BoolVar(helpFlag, "help", false, "display help") versionFlag := flag.Bool("v", false, "Display version information") @@ -49,8 +48,11 @@ func main() { fmt.Println() fmt.Println("Help information:") fmt.Println(" -h --help: Display help information") - fmt.Println(" -v --version: Display version information") fmt.Println(" -i --init: Generate a configuration file") + fmt.Println(" -m --message: Specify a commit message") + fmt.Println(" -s --scope: Specify a custom scope") + fmt.Println(" -t --type: Specify the type from the config file") + fmt.Println(" -v --version: Display version information") return } From 4ff49a09ccbf710b61b4cc9a3fbfbc58f8ed53a8 Mon Sep 17 00:00:00 2001 From: moualhi zine el abidine Date: Mon, 13 Nov 2023 15:48:10 +0100 Subject: [PATCH 2/3] =?UTF-8?q?docs=20=F0=9F=93=9A:=20added=20doc=20entry?= =?UTF-8?q?=20for=20flags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f97646f..7bffe43 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,14 @@ You can skip questions by adding them in `"SkipQuestions"` Only `"Scopes"` question can be skipped since it's optional according to the [Commit Spec](https://www.conventionalcommits.org/en/v1.0.0/) +If you don't want the interactive screen you can use the flags to construct a message: + +```sh + +goji --type feat --scope home --message "Add home page" + +``` + ## License Apache 2.0 license [Zine El Abidine Moualhi](https://www.linkedin.com/in/zinemoualhi/) From 06ff487a34e701b913f9ba3daea37192d2ed5daf Mon Sep 17 00:00:00 2001 From: moualhi zine el abidine Date: Mon, 13 Nov 2023 15:52:38 +0100 Subject: [PATCH 3/3] =?UTF-8?q?fix=20=F0=9F=90=9B:=20fixed=20missing=20ldf?= =?UTF-8?q?s=20flag=20for=20version=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.goreleaser.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/.goreleaser.yml b/src/.goreleaser.yml index 73295f5..f0cd21d 100644 --- a/src/.goreleaser.yml +++ b/src/.goreleaser.yml @@ -11,6 +11,8 @@ builds: - CGO_ENABLED=0 flags: - -mod=vendor + ldflags: + - -s -w -X main.version={{.Version}} release: prerelease: auto