Skip to content

Commit

Permalink
Merge pull request #62 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 3.0.5
  • Loading branch information
andyone authored Jun 26, 2024
2 parents a224a74 + f775292 commit 700e014
Show file tree
Hide file tree
Showing 12 changed files with 149 additions and 113 deletions.
52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: ❗ Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["issue • bug"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar bug reports. If so, please add a 👍 reaction to the existing issue.
- type: textarea
attributes:
label: Verbose application info
description: Output of `gomakegen -vv` command
render: shell
validations:
required: true

- type: dropdown
id: version
attributes:
label: Install tools
description: How did you install this application
options:
- From Sources
- RPM Package
- Prebuilt Binary
default: 0
validations:
required: true

- type: textarea
attributes:
label: Steps to reproduce
description: Short guide on how to reproduce this problem on our site
placeholder: |
1. [First Step]
2. [Second Step]
3. [and so on...]
validations:
required: true

- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen
validations:
required: true

- type: textarea
attributes:
label: Actual behavior
description: What actually happened
validations:
required: true

- type: textarea
attributes:
label: Additional info
description: Include gist of relevant config, logs, etc.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: ❓ Question
description: Question about application, configuration or code
title: "[Question]: "
labels: ["issue • question"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar question. If so, please add a 👍 reaction to the existing issue.
- type: textarea
attributes:
label: Question
description: Detailed question
validations:
required: true

- type: textarea
attributes:
label: Related version application info
description: Output of `gomakegen -vv` command
render: shell
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ➕ Suggestion
description: Suggest new feature or improvement
title: "[Suggestion]: "
labels: ["issue • suggestion"]
assignees:
- andyone

body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Before you open an issue, search GitHub Issues for a similar feature requests. If so, please add a 👍 reaction to the existing issue.
>
> Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them.
- type: textarea
attributes:
label: Proposal
description: Description of the feature
validations:
required: true

- type: textarea
attributes:
label: Current behavior
description: What currently happens
validations:
required: true

- type: textarea
attributes:
label: Desired behavior
description: What you would like to happen
validations:
required: true

- type: textarea
attributes:
label: Use case
description: Why is this important (helps with prioritizing requests)
validations:
required: true
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ jobs:
- name: Build binary
run: make all

- name: Run tests
working-directory: ${{env.SRC_DIR}}
run: bash .scripts/script.sh

Typos:
name: Typos
runs-on: ubuntu-latest
Expand Down
33 changes: 0 additions & 33 deletions .scripts/script.sh

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################

# This Makefile generated by GoMakeGen 3.0.4 using next command:
# This Makefile generated by GoMakeGen 3.0.5 using next command:
# gomakegen --mod --strip .
#
# More info: https://kaos.sh/gomakegen
Expand Down Expand Up @@ -109,6 +109,6 @@ help: ## Show this info
| sed 's/ifdef //' \
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-11s\033[0m %s\n", $$1, $$2}'
@echo -e ''
@echo -e '\033[90mGenerated by GoMakeGen 3.0.4\033[0m\n'
@echo -e '\033[90mGenerated by GoMakeGen 3.0.5\033[0m\n'

################################################################################
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<p align="center"><a href="#readme"><img src=".github/images/card.svg"/></a></p>

<p align="center">
<a href="https://kaos.sh/w/gomakegen/ci"><img src="https://kaos.sh/w/gomakegen/ci.svg" alt="GitHub Actions CI Status" /></a>
<a href="https://kaos.sh/w/gomakegen/codeql"><img src="https://kaos.sh/w/gomakegen/codeql.svg" alt="GitHub Actions CodeQL Status" /></a>
<a href="https://kaos.sh/r/gomakegen"><img src="https://kaos.sh/r/gomakegen.svg" alt="GoReportCard" /></a>
<a href="https://kaos.sh/b/gomakegen"><img src="https://kaos.sh/b/6f7a19c8-d78d-4062-a8cf-fdac4b8d1f85.svg" alt="Codebeat badge" /></a>
<a href="https://kaos.sh/y/gomakegen"><img src="https://kaos.sh/y/55b2a258de5b4f0b9a75da00802f149d.svg" alt="Codacy badge" /></a>
<br/>
<a href="https://kaos.sh/w/gomakegen/ci"><img src="https://kaos.sh/w/gomakegen/ci.svg" alt="GitHub Actions CI Status" /></a>
<a href="https://kaos.sh/w/gomakegen/codeql"><img src="https://kaos.sh/w/gomakegen/codeql.svg" alt="GitHub Actions CodeQL Status" /></a>
<a href="#license"><img src=".github/images/license.svg"/></a>
</p>

Expand All @@ -16,7 +18,7 @@

### Installation

To build the `gomakegen` from scratch, make sure you have a working Go 1.19+ workspace (_[instructions](https://go.dev/doc/install)_), then:
To build the `gomakegen` from scratch, make sure you have a working Go 1.21+ workspace (_[instructions](https://go.dev/doc/install)_), then:

```
go install github.com/essentialkaos/gomakegen@latest
Expand Down Expand Up @@ -59,7 +61,7 @@ gomakegen --generate-man | sudo gzip > /usr/share/man/man1/gomakegen.1.gz

### Usage

<p align="center"><img src=".github/images/usage.svg"/></p>
<img src=".github/images/usage.svg"/>

### CI Status

Expand Down
19 changes: 4 additions & 15 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (
// App info
const (
APP = "GoMakeGen"
VER = "3.0.4"
VER = "3.0.5"
DESC = "Utility for generating makefiles for Go applications"
)

Expand Down Expand Up @@ -548,8 +548,9 @@ func containsPackage(imports []string, pkgs []string) bool {

// getBasePkgPath returns base package path
func getBasePkgPath(dir string) string {
gopath := os.Getenv("GOPATH")
gopath, _ := filepath.EvalSymlinks(os.Getenv("GOPATH"))
absDir, _ := filepath.Abs(dir)
absDir, _ = filepath.EvalSymlinks(absDir)

return strutil.Exclude(absDir, gopath+"/src/")
}
Expand All @@ -561,10 +562,6 @@ func containsStableImports(imports []string) bool {
}

for _, pkg := range imports {
if strings.HasPrefix(pkg, "pkg.re") {
return true
}

if strings.HasPrefix(pkg, "gopkg.in") {
return true
}
Expand Down Expand Up @@ -965,7 +962,7 @@ func (m *Makefile) getFuzzTarget() string {
}

result := "gen-fuzz: ## Generate archives for fuzz testing\n"
result += "\t@which go-fuzz-build &>/dev/null || go get -u -v github.com/dvyukov/go-fuzz/go-fuzz-build\n"
result += "\t@which go-fuzz-build &>/dev/null || go install github.com/dvyukov/go-fuzz/go-fuzz-build@latest\n"
result += getActionText(1, 1, "Generating fuzzing data…")

for _, pkg := range m.FuzzPaths {
Expand Down Expand Up @@ -1187,14 +1184,6 @@ func (m *Makefile) getGenerationComment() string {
result += fmt.Sprintf("--%s ", getOptionName(OPT_RACE))
}

if options.GetS(OPT_OUTPUT) != "Makefile" {
result += fmt.Sprintf(
"--%s %s ",
getOptionName(OPT_OUTPUT),
options.GetS(OPT_OUTPUT),
)
}

result += ".\n"
result += "#\n"
result += "# More info: https://kaos.sh/gomakegen\n\n"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/essentialkaos/gomakegen

go 1.19

require github.com/essentialkaos/ek/v12 v12.127.0
require github.com/essentialkaos/ek/v12 v12.128.0

require (
github.com/essentialkaos/depsy v1.3.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
github.com/essentialkaos/depsy v1.3.0 h1:CN7bRgBU2jGTHSkg/Sh38eDUn7cvmaTp2sxFt2HpFeU=
github.com/essentialkaos/depsy v1.3.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8=
github.com/essentialkaos/ek/v12 v12.127.0 h1:fU5A+QbIZ7NTq1K5jGVwAWwuLtBUhsIKuRWYT78hE+Q=
github.com/essentialkaos/ek/v12 v12.127.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw=
github.com/essentialkaos/ek/v12 v12.128.0 h1:vaBvqvYZtkBxmiYSMllYA6MRbNbiOXcxwKEVbZqxxLE=
github.com/essentialkaos/ek/v12 v12.128.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
Expand Down

0 comments on commit 700e014

Please sign in to comment.