Skip to content

Commit

Permalink
fix: use direct file instead of embedded file for generate version
Browse files Browse the repository at this point in the history
  • Loading branch information
Hintay committed Feb 3, 2025
1 parent c774359 commit de420ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/version/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"os"
"path"
"runtime"

"github.com/0xJacky/Nginx-UI/app"
)

type VersionInfo struct {
Expand All @@ -28,7 +26,7 @@ func main() {
}
basePath := path.Join(path.Dir(file), "../../")

versionFile, err := app.DistFS.Open("dist/version.json")
versionFile, err := os.Open(path.Join(basePath, "app/dist/version.json"))
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
log.Print("\"dist/version.json\" not found, load from src instead")
Expand Down

0 comments on commit de420ab

Please sign in to comment.