diff --git a/server/deploy.sh b/server/deploy.sh index c222411..ae0ee46 100755 --- a/server/deploy.sh +++ b/server/deploy.sh @@ -23,7 +23,7 @@ set -euo pipefail cd /home/hmn/hmn git fetch --all git reset --hard origin/$branch -go build -o /home/hmn/bin/hmn src/main.go +go build -o /home/hmn/bin/hmn . SCRIPT echo "Running migrations..." diff --git a/server/root.Makefile b/server/root.Makefile index 71bd75b..ac9fdde 100644 --- a/server/root.Makefile +++ b/server/root.Makefile @@ -15,7 +15,7 @@ deploy: ## Manually build and deploy a branch of the website. /home/hmn/hmn/server/deploy.sh build: ## Rebuild the website binary - sudo -u hmn --preserve-env=PATH bash -c "cd ~/hmn && go build -o /home/hmn/bin/hmn src/main.go" + sudo -u hmn --preserve-env=PATH bash -c "cd ~/hmn && go build -o /home/hmn/bin/hmn ." edit-config: ## Edit the website config vim /home/hmn/hmn/src/config/config.go diff --git a/server/serversetup.sh b/server/serversetup.sh index 42f92b6..d053886 100755 --- a/server/serversetup.sh +++ b/server/serversetup.sh @@ -289,7 +289,7 @@ if [ $checkpoint -lt 110 ]; then cd /home/hmn/hmn echo "Building the site for the first time. This may take a while..." - go build -v -o /home/hmn/bin/hmn src/main.go + go build -v -o /home/hmn/bin/hmn . SCRIPT echo 'PATH=$PATH:/home/hmn/bin' >> ~/.bashrc diff --git a/src/main.go b/src/main.go new file mode 100644 index 0000000..4149129 --- /dev/null +++ b/src/main.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + +func main() { + fmt.Println("main.go has moved! You should now run:") + fmt.Println("go run .") +}