mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix: use direct file instead of embedded file for generate version
This commit is contained in:
parent
c774359531
commit
de420ab6ff
1 changed files with 1 additions and 3 deletions
|
@ -10,8 +10,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/0xJacky/Nginx-UI/app"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type VersionInfo struct {
|
type VersionInfo struct {
|
||||||
|
@ -28,7 +26,7 @@ func main() {
|
||||||
}
|
}
|
||||||
basePath := path.Join(path.Dir(file), "../../")
|
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 err != nil {
|
||||||
if errors.Is(err, fs.ErrNotExist) {
|
if errors.Is(err, fs.ErrNotExist) {
|
||||||
log.Print("\"dist/version.json\" not found, load from src instead")
|
log.Print("\"dist/version.json\" not found, load from src instead")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue