From 43714f1bd9f431ed27bef918353b55abef99f554 Mon Sep 17 00:00:00 2001 From: Joshua Rich Date: Wed, 24 Jan 2024 20:41:25 +1000 Subject: [PATCH] refactor(config,hass): :recycle: remove embedded version remove the embedded version for now --- .vscode/settings.json | 3 ++- pkg/config/config.go | 6 ------ pkg/hass/entities.go | 6 ++---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c35be63..09ae0d8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "conventionalCommits.scopes": [ - "web" + "web", + "tools" ], "go.lintTool": "golangci-lint", "go.lintFlags": [ diff --git a/pkg/config/config.go b/pkg/config/config.go index 722c5b6..fc1067c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -6,15 +6,9 @@ package config import ( - _ "embed" - tomlConfig "github.com/joshuar/go-hass-anything/pkg/config/toml" ) -//go:generate sh -c "printf %s $(git tag | tail -1) > VERSION" -//go:embed VERSION -var AppVersion string - //go:generate moq -out mock_configAppConfig_test.go . AppConfig type AppConfig interface { // IsRegistered will retrieve the registration status of the app from its config. diff --git a/pkg/hass/entities.go b/pkg/hass/entities.go index 27f0ef1..aa3f19d 100644 --- a/pkg/hass/entities.go +++ b/pkg/hass/entities.go @@ -12,7 +12,6 @@ import ( MQTT "github.com/eclipse/paho.mqtt.golang" "github.com/iancoleman/strcase" - "github.com/joshuar/go-hass-anything/pkg/config" "github.com/joshuar/go-hass-anything/pkg/mqtt" "golang.org/x/text/cases" "golang.org/x/text/language" @@ -220,9 +219,8 @@ func (e *EntityConfig) WithOriginInfo(o *Origin) *EntityConfig { // to the entity config. func (e *EntityConfig) WithDefaultOriginInfo() *EntityConfig { e.Entity.Origin = &Origin{ - Name: "Go Hass Agent", - URL: "https://github.com/joshuar/go-hass-agent", - Version: config.AppVersion, + Name: "Go Hass Anything", + URL: "https://github.com/joshuar/go-hass-anything", } return e }