Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Sep 28, 2023
1 parent 4f2cc3a commit 70e72b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ yarn.lock
yarn-error.log
.DS_Store
bun.lockb
onlinetool-*
8 changes: 4 additions & 4 deletions server/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ func buildForProd(forLinux bool) string {
os.RemoveAll(frontEndBuildDir)

if u.IsMac() {
runCmdLoggedInDir("frontend", "bun", "install")
runCmdLoggedInDir("frontend", "bun", "run", "build")
runCmdLoggedInDir(".", "bun", "install")
runCmdLoggedInDir(".", "bun", "run", "build")
} else {
runCmdLoggedInDir("frontend", "yarn")
runCmdLoggedInDir("frontend", "yarn", "build")
runCmdLoggedInDir(".", "yarn")
runCmdLoggedInDir(".", "yarn", "build")
}

// get date and hash of current checkin
Expand Down
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func makeHTTPServer(proxyHandler *httputil.ReverseProxy, fsys fs.FS) *http.Serve
Handler: http.HandlerFunc(handlerWithMetrics),
}
httpAddr := fmt.Sprintf(":%d", httpPort)
if isDev() {
if isWinOrMac() {
httpAddr = "localhost" + httpAddr
}
httpSrv.Addr = httpAddr
Expand Down
4 changes: 2 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export default defineConfig({
targets: [
{
src: "./frontend/notepad2/**/*.bmp",
dest: resolve("dist", "notepad2"),
dest: resolve("frontend", "dist", "notepad2"),
},
{
src: "./frontend/libarchive/**/*",
dest: resolve("dist", "libarchive"),
dest: resolve("frontend", "dist", "libarchive"),
},
],
}),
Expand Down

0 comments on commit 70e72b8

Please sign in to comment.