Skip to content

Commit

Permalink
Remove doctor references to nfpm
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Nov 30, 2024
1 parent bd568e6 commit 0f2bd0e
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 42 deletions.
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/apt.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ func (a *Apt) Packages() Packagemap {
"npm": []*Package{
{Name: "npm", SystemPackage: true},
},
"nfpm": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/dnf.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ func (y *Dnf) Packages() Packagemap {
{Name: "npm", SystemPackage: true},
{Name: "nodejs-npm", SystemPackage: true},
},
"nfpm*": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/emerge.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ func (e *Emerge) Packages() Packagemap {
"npm": []*Package{
{Name: "net-libs/nodejs", SystemPackage: true},
},
"nfpm": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/eopkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ func (e *Eopkg) Packages() Packagemap {
"npm": []*Package{
{Name: "nodejs", SystemPackage: true},
},
"nfpm": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/nixpkgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ func (n *Nixpkgs) Packages() Packagemap {
"npm": []*Package{
{Name: channel + ".nodejs", SystemPackage: true},
},
"nfpm": []*Package{
{Name: channel + ".nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
21 changes: 0 additions & 21 deletions v3/internal/doctor/packagemanager/packagemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ func AppVersion(name string) string {
return npmVersion()
}

if name == "nfpm" {
return nfpmVersion()
}

return ""

}
Expand Down Expand Up @@ -171,20 +167,3 @@ func npmVersion() string {
version, _ := execCmd("npm", "--version")
return strings.TrimSpace(version)
}

func nfpmVersion() string {
output, _ := execCmd("nfpm", "--version")
lines := strings.Split(output, "\n")
for _, line := range lines {
if strings.HasPrefix(line, "GitVersion:") {
version := strings.TrimSpace(strings.TrimPrefix(line, "GitVersion:"))
return version
}
}
return "unknown"
}

func isNfpmInstalled() bool {
_, err := exec.LookPath("nfpm")
return err == nil
}
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/pacman.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ func (p *Pacman) Packages() Packagemap {
"npm": []*Package{
{Name: "npm", SystemPackage: true},
},
"nfpm": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down
3 changes: 0 additions & 3 deletions v3/internal/doctor/packagemanager/zypper.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ func (z *Zypper) Packages() Packagemap {
"npm": []*Package{
{Name: "npm10", SystemPackage: true},
},
"nfpm": []*Package{
{Name: "nfpm", SystemPackage: false, InstallCheck: isNfpmInstalled, InstallCommand: "go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest", Optional: true},
},
}
}

Expand Down

0 comments on commit 0f2bd0e

Please sign in to comment.