Add GoReleaser configuration and update Makefile for streamlined builds
Some checks failed
Release Tag / release (push) Failing after 46s
Some checks failed
Release Tag / release (push) Failing after 46s
- Introduced .goreleaser.yaml for automated release management. - Updated Makefile to utilize GoReleaser for building the jiggablend binary. - Added new workflows for release tagging and pull request checks in Gitea. - Updated dependencies in go.mod and go.sum, including new packages for versioning. - Enhanced .gitignore to exclude build artifacts in the dist directory.
This commit is contained in:
@@ -32,4 +32,3 @@ func exitWithError(msg string, args ...interface{}) {
|
||||
fmt.Fprintf(os.Stderr, "Error: "+msg+"\n", args...)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
25
cmd/jiggablend/cmd/version.go
Normal file
25
cmd/jiggablend/cmd/version.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"jiggablend/version"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version information",
|
||||
Long: `Print the version and build date of jiggablend.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("jiggablend version %s\n", version.Version)
|
||||
if version.Date != "" {
|
||||
fmt.Printf("Build date: %s\n", version.Date)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
|
||||
"jiggablend/cmd/jiggablend/cmd"
|
||||
_ "jiggablend/version"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -11,4 +12,3 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user