Skip to content

Commit

Permalink
try fix goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio committed Dec 29, 2023
1 parent a644233 commit b97e698
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: stable
go-version: '1.21'
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ before:
hooks:
- make distclean
- go mod verify
- go mod tidy
- go generate ./...

gomod:
Expand Down
3 changes: 1 addition & 2 deletions cmd/elvoke/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"al.essio.dev/pkg/tools/version"
"crypto/sha256"
"flag"
"fmt"
Expand All @@ -11,8 +12,6 @@ import (
"path/filepath"
"strings"
"time"

"al.essio.dev/pkg/tools/internal/version"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions cmd/mcd/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package main

import (
"al.essio.dev/pkg/tools/version"
"flag"
"fmt"
"log"
"os"

"al.essio.dev/pkg/tools/internal/version"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/pathctl/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package main

import (
"al.essio.dev/pkg/tools/version"
"flag"
"fmt"
"log"
"os"
"strings"

"al.essio.dev/pkg/tools/internal/version"
"al.essio.dev/pkg/tools/pathlist"
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/portup/main.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package main

import (
"al.essio.dev/pkg/tools/version"
"flag"
"fmt"
"io"
"log"
"os"
"os/exec"
"strings"

"al.essio.dev/pkg/tools/internal/version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/seq/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"al.essio.dev/pkg/tools/version"
"flag"
"fmt"
"log"
Expand All @@ -9,7 +10,6 @@ import (
"strings"

"al.essio.dev/pkg/tools/internal/seq"
"al.essio.dev/pkg/tools/internal/version"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions internal/version/version.go → version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import (

//go:generate bash generate_version.sh
//go:embed version.txt

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / test

pattern version.txt: no matching files found

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / lint

pattern version.txt: no matching files found (typecheck)

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

pattern version.txt: no matching files found

Check failure on line 11 in version/version.go

View workflow job for this annotation

GitHub Actions / lint

pattern version.txt: no matching files found (typecheck)
var Version string
var version string

func Short() string {
return fmt.Sprintf("unixtools %s", Version)
return fmt.Sprintf("unixtools %s", version)
}

func PrintWithCopyright() {
_, _ = fmt.Println(longWithCopyright())
}

func longWithCopyright() string {
return fmt.Sprintf("alessio's unixtools, version %s\nCopyright (C) 2020, 2021, 2022, 2023 Alessio Treglia <alessio@debian.org>", strings.TrimSpace(Version))
return fmt.Sprintf("alessio's unixtools, version %s\nCopyright (C) 2020, 2021, 2022, 2023 Alessio Treglia <alessio@debian.org>", strings.TrimSpace(version))
}

0 comments on commit b97e698

Please sign in to comment.