added releaser env support

This commit is contained in:
Vito Castellano 2025-01-28 23:32:09 +01:00
commit 433de9b833
No known key found for this signature in database
GPG key ID: CECE2FCDCCF84942
4 changed files with 14 additions and 6 deletions

View file

@ -10,6 +10,8 @@ builds:
- arm64
ldflags:
- -s -w
- -X 'bbrew/internal/services.AppName={{ .ProjectName }}'
- -X 'bbrew/internal/services.AppVersion={{ .Version }}'
archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

7
go.mod
View file

@ -2,11 +2,14 @@ module bbrew
go 1.20
require github.com/rivo/tview v0.0.0-20241227133733-17b7edb88c57
require (
github.com/gdamore/tcell/v2 v2.7.1
github.com/joho/godotenv v1.5.1
github.com/rivo/tview v0.0.0-20241227133733-17b7edb88c57
)
require (
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gdamore/tcell/v2 v2.7.1 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.4.7 // indirect

2
go.sum
View file

@ -2,6 +2,8 @@ github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdk
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
github.com/gdamore/tcell/v2 v2.7.1 h1:TiCcmpWHiAU7F0rA2I3S2Y4mmLmO9KHxJ7E1QhYzQbc=
github.com/gdamore/tcell/v2 v2.7.1/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg=
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=

View file

@ -4,14 +4,15 @@ import (
"bbrew/internal/models"
"fmt"
"github.com/gdamore/tcell/v2"
_ "github.com/joho/godotenv/autoload"
"github.com/rivo/tview"
"os"
"strings"
)
// CONSTANTS
const (
AppName = "MyApp"
AppVersion = "1.0.0"
var (
AppName = os.Getenv("APP_NAME")
AppVersion = os.Getenv("APP_VERSION")
)
type AppServiceInterface interface {