diff --git a/.vscode/launch.json b/.vscode/launch.json index 69ae210..2259b1f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,10 +13,27 @@ { "name": "Attach to Remote", "type": "go", + "debugAdapter": "dlv-dap", "request": "attach", "mode": "remote", "port": 4321, - "host": "152.53.236.243", + "host": "losandesgames.com", + "substitutePath": [ + { "from": "${workspaceFolder}", "to": "/home/alfheim/linux_amd64" }, + ] + }, + { + "name": "Launch Remote", + "type": "go", + "debugAdapter": "dlv-dap", + "request": "launch", + "mode": "exec", + "program": "/home/alfheim/linux_amd64/alfheim-website", + "port": 4321, + "host": "losandesgames.com", + "substitutePath": [ + { "from": "${workspaceFolder}", "to": "/home/alfheim/linux_amd64" }, + ] } ] } \ No newline at end of file diff --git a/Makefile b/Makefile index fab402c..1f8c8f2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -svn_revision = $(svn info --show-item revision) +svn_revision = $(shell svn info --show-item revision) build: @echo "Building the website..." @@ -6,21 +6,21 @@ build: mkdir bin mkdir bin/static mkdir bin/ui - go build -ldflags="-s -X main.version=$(svn_revision)" -o bin/alfheim-website ./cmd/web + go build -ldflags="-X main.version=$(svn_revision)" -o bin/alfheim-website ./cmd/web cp -r ui/html bin cp -r ui/static bin cp Caddyfile bin mkdir bin/linux_amd64 mkdir bin/linux_amd64/static mkdir bin/linux_amd64/ui - GOOS=linux GOARCH=amd64 go build -ldflags="-s -X main.version=$(svn_revision)" -o bin/linux_amd64/alfheim-website ./cmd/web + GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=$(svn_revision)" -o bin/linux_amd64/alfheim-website ./cmd/web cp -r ui/html bin/linux_amd64 cp -r ui/static bin/linux_amd64 cp Caddyfile bin/linux_amd64 run: @echo "Running the website..." - go run ./*.go + go run ./cmd/web/*.go .PHONY: production/deploy production/deploy: