Skip to content

Commit

Permalink
fix: use /opt on debian package
Browse files Browse the repository at this point in the history
  • Loading branch information
z7zmey committed Oct 16, 2017
1 parent bb62be7 commit 4c56847
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fpm:
# dependencies:
# - php
files:
"php-worker/": "/usr/local/lib/codegraph/php-worker"
"ui/dist/": "/usr/local/lib/codegraph/ui/dist"
"php-worker/": "/opt/codegraph/php-worker"
"ui/dist/": "/opt/codegraph/ui/dist"

dockers:
-
Expand Down
2 changes: 1 addition & 1 deletion path.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ProcessPath() {
codeGraphDir, err := filepath.Abs(filepath.Dir(os.Args[0]))

if _, err := os.Stat(codeGraphDir + "/php-worker"); os.IsNotExist(err) {
codeGraphDir = "/usr/local/lib/codegraph"
codeGraphDir = "/opt/codegraph"
}

if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewRouter() *mux.Router {
}

if _, err := os.Stat(codeGraphDir + "/ui"); os.IsNotExist(err) {
codeGraphDir = "/usr/local/lib/codegraph"
codeGraphDir = "/opt/codegraph"
}

router := mux.NewRouter() //.StrictSlash(true)
Expand Down Expand Up @@ -72,7 +72,7 @@ func StaticFileServer(w http.ResponseWriter, r *http.Request) {
}

if _, err := os.Stat(codeGraphDir + "/ui"); os.IsNotExist(err) {
codeGraphDir = "/usr/local/lib/codegraph"
codeGraphDir = "/opt/codegraph"
}

path, err := realpath.Realpath(codeGraphDir + "/ui/dist/" + r.URL.Path)
Expand Down

0 comments on commit 4c56847

Please sign in to comment.